Ah, in an alternate world where Brendan Eich wasn't pressured by his superiors to make JS more Java-like, we could have had something like this as very normal.
I wonder how much faster that would have pushed the world into FP ideas. While sometimes I prefer the bracket/C syntax, I wonder how things would have evolved if JS was a lisp originally. Instead of things moving to TypeScript, would they be moving to something like typed Lisp or OCaml, or PureScript ?
bitwize•1h ago
The JS backend to Gambit is now pretty mature. If you're willing to deal with Scheme, Gambit, and its FFI, you can live in that alternate "Scheme in the browser" universe even without WASM.
jackdaniel•39m ago
There's also Guile Hoots compiling directly to WASM.
umanwizard•39m ago
Is CL really particularly more “functional” than JavaScript? I don’t know CL but I know it bears some passing similarity to Emacs Lisp, which is usually written in a pretty imperative style. Sure, it has first-class closures but so does JS.
jackdaniel•33m ago
CL enables many paradigms of programming, including functional one and imperative. Currently the most popular way of programming among CL programmers is OOP with CLOS.
taeric•19m ago
As the sibling says, CL can be written in most any style. Which, I think it is fair to say for any general programming language? The book Exercises in Programming Style highlights that. That said, CL feels far friendlier to the various styles than other languages, to me.
adamddev1•2h ago
I wonder how much faster that would have pushed the world into FP ideas. While sometimes I prefer the bracket/C syntax, I wonder how things would have evolved if JS was a lisp originally. Instead of things moving to TypeScript, would they be moving to something like typed Lisp or OCaml, or PureScript ?
bitwize•1h ago
jackdaniel•39m ago
umanwizard•39m ago
jackdaniel•33m ago
taeric•19m ago
Link to book on Amazon: https://www.amazon.com/dp/0367350203