5 ms·
No. Worse is Better would explain why browsers would use Smaltalk (or Self) directly, instead of inventing a new programming language. Javascript was probably
by loup-vaillant 13y ago
No. Worse is Better would explain why browsers would use Smaltalk (or Self) directly, instead of inventing a new programming language.
Javascript was probably born out of Not Invented Here. Worse Is Better only contributed the curly braces from C, and the continued use of the first widely known scripting engine.
If The Right Thing is already there, Worse Is Better simply doesn't win without exterior help. Worse is better only because it's first. And even so…
> when Better gets here, it's not Better anymore, only marginally more useful.
I would say perceived as marginally more useful in the short term. This is a point where Worse easily looks Better, but whether it is is more debatable.
- Ygg2 13y agoI'm gonna disagree. Could you implement Smalltalk environment in browser in two weeks? I'd doubt you could (assuming you are Brendan Eich, circa 1995), realistically. It is a sloppily written language that was perfected later over course of decades. Worse is Better is omnipresent. Linux vs Minix vs BeOS vs Windows is example of Linux despite being bad relatively, simply winning out (on servers) due to its developer base and losing to Windows that despite numerous faults/warts won the desktop market by a large margin. When I said Right Thing being here, I didn't mean existence, but presence. Right thing may exist in heads of few masters that know it super well, but them being unable or unwilling to spread it dooms the Right Thing. A Worse Thing that spreads far and wide will win and has always won. Xanadu vs Internet Linux vs BeOS MacOS vs Windows Lisp/Smalltalk vs C
- loup-vaillant 13y ago> Could you implement Smalltalk environment in browser in two weeks? You're being unfair: you compare a Javascript interpreter against a Smalltalk environment. Obviously, If I were in a rush, I would start with a simple interpreter first. Realistically, if you don't really care about performance (I doubt Brendan Eich did at the time), implementing a JavaScript interpreter is neither easier nor harder than implementing a Lisp or Smalltalk or Self interpreter. I maintain that ease of implementation simply was not an influential factor either way. Therefore, Javascript was invented for other reasons. My best guess is, Brendan Eich wanted his language to be non-intimidating to C, C++, and Java users. Apparently, it worked. Oh. That is a typical "Worse is Better". Okay, I retract. "Worse is Better" is an excellent explanation for Javascript. There are just other kinds of short term benefits persisting through time than the mere ease of implementation.
- Ygg2 13y agoOk. Then implement a Smalltalk interpreter in a week. And then make it look like Java, because that was Brendan's task.
- loup-vaillant 13y agoHmm… I think that's pretty much what Brendan did, although he likely started with Self instead of Smalltalk. JavaScript makes a strong emphasis on objects, and had closures from the beginning. Then it has a Java-ish syntax. As for actually implementing a smaltalk interpreter, it can now be done in 300 lines: http://www.youtube.com/watch?v=EGeN2IC7N0Q http://www.youtube.com/watch?v=EGeN2IC7N0Q (I believe he used Maru http://piumarta.com/software/maru/ http://piumarta.com/software/maru/ ) With current techniques, a language specialist can implement Smalltalk in a day. I'm not that strong, though. It could take me from a week to a month, depending on how much I need to learn. (Parsing the syntax is easy, but I'm less sure about the semantics.)