Gleam and the value of small
25 points by kamila
25 points by kamila
I was soo scared of delivering this talk at the Ubuntu Summit! Hopefully people will enjoy it, I had a really fun time drawing the slides for this
How good is keyword count at measuring simplicity or “smallness”? Lisp and Forth don’t really have any. Smalltalk has just 5 (or 6 depending on how you count).
What I wish the BEAM world had was something inspired by Smalltalk in syntax (few keywords, almost natural language parsing, Smalltalks unique take on interwoven functions and their parameters) welded with all the awesomeness of functions, immutable, processes, etc.
That aside. Talk was well done and hats off to the presenter. Doing these kinds of presentations is how computing gets meaningfully advanced.
Lisp
Most Lisps are implemented with somethings being special builtins which don't quite compose in the same way (e.g. def) with everything composed of those - which is one count. Possibly a better way: every Lisp I know of has ' e.g. '(1 2 3) which is syntax sugar for quote. Clojure-likes has more sugar like { } and [ ] and :keyword which are also functions like array or tuple or table etc. Dito for macro sugar like ; and # and ~ etc. depending on the Lisp. Counting those sorts of things, we have probably 15-20 in a given lisp.
Most Lisps are implemented with somethings being special builtins
IIRC you are talking about special forms. Those concern semantics. Special forms can't be be implemented using regular constructs of the language. Although there is some wiggle room. Keywords are related to parsing. They result in things like not being able to use do as the name of an argument in JavaScript. Lisp has 0 keywords. One can use cl:if as function argument, You can rebind symbols in the CL package, shadow them, etc.
Clojure-likes has more sugar like { } and [ ]
Literals are not sugar, the resulting value is not the same as the ones produced by function application. e.j. destructively modifying a literal is undefined behaviour. That applies to scheme afaik. It should apply to Clojure as well.