←back to thread

110 points jackdaniel | 1 comments | | HN request time: 0s | source
Show context
adamddev1 ◴[] No.44972696[source]
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 ?

replies(5): >>44973351 #>>44973702 #>>44976138 #>>44976751 #>>44977298 #
umanwizard ◴[] No.44973702[source]
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.
replies(6): >>44973781 #>>44973976 #>>44974501 #>>44975807 #>>44976563 #>>44984186 #
wk_end ◴[] No.44974501[source]
I kind of agree, but in the interest of discussion: even if CL isn't necessarily a more functional language in practice, culturally it's got a long history of being more functional. It took something like a decade at least for people to widely recognize to how elegant (in its quirky way) JavaScript could be. Just as a point of comparison (I'm sure the idea goes further back) PAIP - one of the definitive CL books - was first published in 1991 and encourages pure functions and immutability wherever possible.

Devs in the 90s were handed a language that looked like a weird Java and so they programmed it like a weird Java. If they were handed a language that looked like Lisp instead, maybe they would have made their way to SICP that much sooner.

replies(1): >>44976789 #
1. behnamoh ◴[] No.44976789[source]
> ... culturally it's got a long history of being more functional

Sure, but CL also culturally has a long history of macro-ridden code that make it harder to understand other people's code.

We already suffer from dozens of JS frameworks. Just imagine what it would look like under a CL-dominant world...