3 ms·
Not really news, is it? Brendan Eich himself has said that he wanted to use Scheme as the embedded language in the browser, but the higher ups thought people w
by SwellJoe 18y ago
Not really news, is it? Brendan Eich himself has said that he wanted to use Scheme as the embedded language in the browser, but the higher ups thought people would be frightened off by all the parentheses. So, he sneakily implemented Scheme with C-style syntax and nobody seemed to notice for a few years.
- jsmcgd 18y agoImagine how different the programming landscape would look if he had stuck to his guns. We can but dream ...
- SwellJoe 18y agoYou reckon he didn't stick to his guns? I think he did alright for a relatively junior level developer, a lone developer to boot, given the task of "add scripting to the browser". I can imagine far worse fates, particularly given how enamored of Java the entire industry was at the time. I have nothing but respect for Eich and JavaScript. It's held up strikingly well for what could have been, and odds were in favor of it being, a band aid solution. Given the circumstances, I think we're just lucky that Netscape had some of the best developers in the world working on it at that time...because the one who got stuck adding "scripting" happened to be quite gifted and ambitious, and took the task very seriously and came up with something quite clever. It was a very different time, and dynamic languages were a bit downtrodden. Tcl was the closest to a "standard embedded scripting language" and I think I'm comfortable calling JavaScript a more powerful language than Tcl (at least at the time, though I think the two have stayed the same related to one another over that time, despite advances in both). And, of course, Tcl was only popular among UNIX nerds. Getting Windows developers on board might have been a problem...a whole new "simple" language like JavaScript may have been exactly what the industry needed. I dunno. It's certainly apparent that JavaScript has revealed itself to be a very powerful language in the past few years.
- jsmcgd 18y agoDon't get me wrong, I'm a big fan of Javascript. I'm just saddened that we didn't get a complete Scheme. Things like, for example, metaprogramming are massively helpful when interacting with HTML. Collectively we all might have had a lot less work to do.
- silentbicycle 18y agoIt seems like many of the strengths of Lisp/Scheme are an emergent property of the S-expression syntax, though. Expressions like ((if test func-one func-two) arg1 arg2 etc) are certainly more awkward with infix notation, for example. Using OO/polymorphism is one way around this, but that's a bit heavy-handed in situations where it's just a workaround for infix syntax. (Duplicated code with a switch or if block is even worse.) Also, macros / code generation are vastly easier with a consistently prefix notation. Similarly, many of the advantages of stack-based languages like Forth and Factor emerge from postfix notation. Very interesting to compare the two. It's really too bad that non-C-style syntax freaks people out so much, from a technical standpoint it's almost certainly the worst of the three. </fighting words>
- gruseom 18y agoIt seems like many of the strengths of Lisp/Scheme are an emergent property of the S-expression syntax, though. I agree, and I think your use of the word "emergent" is exactly right: the properties in question were unanticipated, yet orderly and beautiful. This point explains why abortive attempts to "fix" the s-expression syntax are about as old as the syntax itself.