4 ms·
I'm writing all my stuff in CoffeeScript (which trans/com/piles to JavaScript). I feel like almost the last man standing at this point. I have some plans to rev
by DemocracyFTW2 11mo ago
I'm writing all my stuff in CoffeeScript (which trans/com/piles to JavaScript). I feel like almost the last man standing at this point. I have some plans to revive a fork of https://github.com/jashkenas/coffeescript https://github.com/jashkenas/coffeescript but those are ... plans.
I like CS for its syntax which is indentation-based similar to Python; in addition, you get e.g. paren-less function calls as in `mul 4, 5`; also, all functions are 'lambdas' and declared like other values, so e.g. `mul = ( a, b ) -> a * b`. Implicit returns are great for one-liners but a problem everywhere else, so that would be one thing to improve in the future.
As for another change that goes beyond mere syntax is the scoping rules which CoffeeScript adopted in the style of Python. As a result, both Python and CoffeeScript now suffer from similar deficits regarding accidental shadowing; in addition, CoffeeScript explicitly refused to allow (equivalents to or the very keywords) `let` and `const` into the language which means they're now stuck with `var`. Bad.
Also I envision 'tagged values', a feature similar to tagged templates where you can prepend a function name directly to a literal and have the function turn the literal into the desired value, so `s[ 4, 6, 7, 9, ]` could be defined (in userland) to result in `new Set [ 4, 6, 7, 9, ]`.
I'm aware of better-maintained alternatives like https://livescript.net https://livescript.net but I'd have to convince myself the transition would be worth it. As for other languages—I look into them with interest, but nothing that doesn't compile to WASM and runs on NodeJS is of practical interest to me; I'm not going to change my VM.