2 ms·
> had an S-expression syntax, but this was changed to a more Algol-like syntax due to the prevailing opinion among many that an Algol-like syntax would be easie
by neilv 2y ago
> had an S-expression syntax, but this was changed to a more Algol-like syntax due to the prevailing opinion among many that an Algol-like syntax would be easier for C/Pascal/C++ programmers to adopt.
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 https://www.youtube.com/watch?v=KUHqFhnen0U
- bitwize 2y agoIf you're already a seasoned programmer, maybe different syntax causes little friction. 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.
- neilv 2y agoMatthias Felleisen, et al., also found that syntax is one of the barriers to new students with zero prior programming experience. 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...
- lispm 2y agoRacket now gets a new, non-s-expression, syntax. The Lisp syntax is said to be a problem hindering wider adoption.
- Create 2y agoFor the others: According to James Gosling's intentions, by retaining the familiar syntax of C programming with its use of curly braces, Java aimed to build upon the existing skills and knowledge of a larger community of developers who were already well-versed in C. This decision was meant to make the transition to Java as smooth as possible for those programmers, thereby increasing their adoption of the new language and its associated ecosystem (VM etc.). By the way, JavaScript was originally an embedded Scheme and had nothing in common with Java, except for the Sun marketing team (Brendan Eich was brave and took no pride...).
- lycopodiopsida 2y ago*Some* people behind Rhombus think that lisp syntax is a problem - we will see. My prediction is that it will not even leave a dent - people get all kind of strange ideas without having any kind of data to prove their claims. To me it looks like just another python: https://docs.racket-lang.org/rhombus/index.html https://docs.racket-lang.org/rhombus/index.html
- whartung 2y agoBack in the day, Lisps and Schemes has had all sorts of excuses for not being used. To slow, GC is slow, too big, no libraries, too old, etc. etc. etc. All reasons that had some merit at one time. But today, all of those excuses have been long gone for a long time. Clojure is as mainstream and box checking as you can get, much less all of the other zillion projects out there. And yet. No great renaissance. Still talked about in hushed tones. "Only those snobby hacker guys use that." And what single thing has remained and controversial about Lisps? The syntax. JavaScript demonstrated that a dynamic language with garbage collection, closures, and functional elements, and native data structures, can be used for everything from web pages to enterprise backends. Many of the things folks complained about in Lisp environments, JavaScript "suffers" from as well. I know I'm not completely on top of things, but I think JavaScript has been reasonably successful and gained some popularity. And behold, of all the things it does not share with Lisps: the syntax. I'm reasonably confident if the hackers at Netscape came out with "S-Script" for their browser, it would be a historical curiosity. As desperate as people were to get scripting in browsers, they would have likely stuck with Explorer, VBA, and everything would be in a VBA clone today. S-expressions have had their chance, and the wisdom of the crowds have not bought into them.
- debit-freak 2y ago> (Bell Labs researchers -> C -> Oak -> Java -> JavaScript.) 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.)