by neilv · 2y ago · 0 comments
They can be forgiven, at the time. Now we have evidence that thinking is wrong. Today we have half of everyone and their dog, as Web programmers, using a syntax originally chosen by very technical systems programmers. (Bell Labs researchers -> C -> Oak -> Java -> JavaScript.)
Almost no Web developers are systems programmers, and this is just a poor syntax for the work, and needlessly cryptic, but they can pick up even this bad syntax just fine.
Now we know that, whether you use curly braces, parentheses, whitespace, or something else is not the barrier to learning a programming language. It's one of the most absolutely trivial things about it to learn.
Knowing this, the next time I hear someone say "We can't use this syntax, because it will just totally break people's brains, even though the higher grammar, semantics, libraries, domain frameworks, and everything else are different anyway, and are orders of magnitude harder to learn, we need to make it look superficially like something it's not, because people are full of poo"... I'm ready to appropriate the Lily Allen song: https://www.youtube.com/watch?v=KUHqFhnen0U
It seems like Javascript inherits more directly from lisp than any of the other languages mentioned, except for the syntax. As a result Javascript is a lisp without macros, which is a sad concept. (In this sense, I very much agree with you.)
But for people new to the craft, syntax matters: Chris Okasaki found that the one thing that helped students get over the hump and really start to understand scopes and blocks was significant whitespace.
Strangely enough, they found that Lisp syntax was easier to pick up, because it was simpler. (In general, the first word in the parentheses tells you what to do with the rest. Not other punctuation to remember, precedence parsing rules, etc.)
We're usually not developing languages for people with zero experience, but if someone wants to twist my arm to use Lisp syntax...