3 ms·
With similar goals and similar feature set there's LiveScript, probably a decade old at this point: https://livescript.net https://livescript.net It lacks some
by klibertp 7y ago
With similar goals and similar feature set there's LiveScript, probably a decade old at this point: https://livescript.net https://livescript.net
It lacks some features of Z, from a cursory glance, for example there's no `match` construct, but it packs most of the features around function currying, piping values, destructuring inputs, composing and so on into a indentation based, low-noise syntax. Syntax preference is of course a personal thing; I prefer the LS one. I've been using LiveScript on and off for years, starting back in the CoffeeScript days on the frontend, then with node, and most recently for Tizen programming. The language is on life support for many years now, meaning no new features - last addition were generator functions - but the feature set is still ahead of JS. There's a bit of an uncomfortable feeling when using constructs like let and const, which compile to very different things than what you get in ES, but well, they were implemented in LS first, so it's understandable.
I may consider Z next time I have a chance, if it's actively maintained and developed. JS may have become a better language, but it's not optimized for functional-first programming - there's no escaping the verbose syntax and the malnoutrished stdlib. It may look like it is, but that's only in comparison with Java or PHP - if you put it beside OCaml and Elixir you'll see it sticking out like a sore thumb. Which isn't bad, of course, JS is a multiparadigm, general-purpose language and it has huge amounts of backward compatibility - with both code and human minds - to uphold. Still, if you want FP-only, it's easier to use another language instead of trying to bend JS almost to the point of breaking with still subpar results.