4 ms·
A nice summary of what Fennel's about here: http://jakob.space/blog/thoughts-on-lisps.html#org4d7f824 http://jakob.space/blog/thoughts-on-lisps.html#org4d7f824
by mumblemumble 6y ago
A nice summary of what Fennel's about here: http://jakob.space/blog/thoughts-on-lisps.html#org4d7f824 http://jakob.space/blog/thoughts-on-lisps.html#org4d7f824
- masklinn 6y agoIt's kinda weird that the only mention of Clojure is > Clojure's license makes it a complete non starter for me, sorry. Live free or die. when at first glance fennel looks a lot like clojure e.g. `fn`, square brackets, {} for maps / table literals.
- SahAssar 6y ago> when at first glance fennel looks a lot like clojure e.g. `fn`, square brackets, {} for maps / table literals. Aren't those mostly inherited from lua and present in a lot of different languages invented before and after clojure?
- masklinn 6y agoLua defines functions with the `function` keywords, and as most other C-style languages uses parenthesis to wrap the function parameters, not brackets. It does use `{}` for table literals but requires the `=` and `,` separators, where fennel (and clojure) uses no internal separator at all: a map literal is a pair of braces around a plist (https://www.gnu.org/software/emacs/manual/html_node/elisp/Property-Lists.html#Property-Lists)[0] https://www.gnu.org/software/emacs/manual/html_node/elisp/Pr.... Historically, lisp have used something around "define" to define functions (e.g. define, defun), parenthesis as essentially the only grouping, and would use macros or special-forms rather than complex literals. Clojure is the first lisp I know of (so I may well have missed a predecessor which inspired it) which largely diverged from that. [0] clojure allows commas but ignores them entirely, I don't know whether fennel allows them as well
- lispm 6y agoIf we think Clojure is a 'diverging Lisp', then there are other diverging Lisps with different syntax like MDL, Logo, Dylan, even JavaScript. Some Scheme code uses angular brackets. Historically core Lisp has left other grouping character or syntax to sublanguages or new data types. There are many examples for that. This is usually done via reader macros, which open up the s-expression reader to the programmer. This is a Joshua rule: (defrule grandfather-determiner (:backward) ;; there are 3 ways to find your grandfather IF [or [is-genetic-grandfather-of ?gramps ?kid] [is-grandfather-thru-step-parent ?gramps ?kid] [is-step-grandfather-of ?gramps ?kid]] THEN [is-grandfather-of ?gramps ?kid]) Many internal or external domain specific languages for Lisp use special syntax and defining forms, since their authors either believed that it's easier to use in general or that it was necessary for 'end users' of their systems. Early examples were maths systems like Macsyma, which were programmable, but addressed mathematicians as audience. Logo, which was Lisp for kids. One of the first theorem provers had the first ML as the programming language interface for its users. Historically Lisp 2 was supposed to get rid of simple s-expressions on the surface. There was a different syntax defined for it.
- masklinn 6y agoI was mostly talking about diverging in the way Fennel had. > Historically core Lisp has left other grouping character or syntax to sublanguages or new data types. Sure, but Clojure uses other grouping characters for the main dialect itself, and Fennel uses very similar deviations from the "Lisp baseline", hence my wondering about the inspiration.
- lispm 6y agoSquare brackets have been used in some Scheme for a long time. There are also Scheme books which use them in code.
- masklinn 6y agoUsed them to define the formal parameters of a function? Because that's what I'm referring to. Fennel uses (fn [param*] expr*) for function definition, which is also how it is spelled in Clojure.
- nonbirithm 6y agoI wish Lua had immutable data structures with memory sharing. It would make the designs of some things much more performant.