5 ms·
Deno should start a campaign with the slogan "Did you know that JavaScript has nothing to do with Java? (except for court trials)" I'd donate.
by moritzwarhier 1y ago
Deno should start a campaign with the slogan "Did you know that JavaScript has nothing to do with Java? (except for court trials)"
I'd donate.
- twoodfin 1y agoI don’t mean to be pedantic, but beyond the deliberate syntactic echoes, JavaScript and Java were the first two languages with (incompatible!) object-oriented data models enforced by the runtime to achieve widespread adoption with longevity (sorry, Smalltalk!) Python was invented earlier, but didn’t see wide use until later. And that they were both massively accelerated by the level of interest in the early WWW is undeniable. No other general purpose languages can say that except perhaps Perl, and it slowly burned out.
- moritzwarhier 1y agoInteresting point, but I'm not able to judge the trutfulness. So the JVM has a runtime-enforced nominal type system (and object model) with classes. But JS, to my knowledge, only has primitive types enforced at runtime, and no nomimal class system, unless you basically implement it yourself? Uh, edit: maybe I get you now, it does have that in a way. But prototype identity and "instanceof" are rarely used in practise. Maybe I'm missing your point here. Answering at late local time. It would be so great to have a nominal type system in the browser though. So many JS librarlies have their own version of it, and it causes insufferable headaches when combined with TypeScript. Like, they use complicated hacks to make sure that their library objects are not structurall/duck typed.
- twoodfin 1y agoclasses != objects Yes, the typing and semantic models are wildly different. The point is that they’re primitive in a way that the other widespread alternative, C++, did not inherit from its Cfront heritage.
- moritzwarhier 1y ago> classes != objects that's what I was aiming at, maybe poorly. There's tons of libraries that use some kind of runtime-observable instance property as a tag, to mimic nominal typing in JS. The same thing is also possible using prototype identity, if you either use the class keyword syntax sugar introduced with ES5 (?), or if you manually do OOP using prototypes. But the latter is very uncommon. It seems to be more common to add a property like $_$_$____superlib__$-inst_WALRUS and use that as a tag.
- johannes1234321 1y agoWell, the models were in so far compatible as that JavaScript could access them to some degree from applets. Which is why they picked the name ...
- devjab 1y ago> Which is why they picked the name ... Is that really true though? As I understood it JavaScript was mainly adopted because Java was popular at the time. JavaScript originally shipped as LiveScript, and they changed it to JavaScript later. Here is a nice quote on it from Brendan Eich: “The name JavaScript was chosen when Java was hot, and we were doing LiveConnect to hook up JS to Java applets.” Here is one from David Flanagan: “JavaScript was originally developed under the name Mocha… It was renamed JavaScript in a co-marketing deal between Netscape and Sun Microsystems.”
- rvnx 1y agoWe can also punish people who are historically connected to this trademark and supporting Oracle. Like in this case, Mozilla and Brave. If they have less users due to Oracle, they will put pressure on Oracle to release the trademark.
- BrendanEich 1y agoBrave doesn't support Oracle, what were you thinking? I'm second signatory to https://javascript.tm https://javascript.tm.
- rvnx 1y agoI am saying because, according to this interview, the name JavaScript was trademarked with the support of Brendan Eich as part of "Sun Microsystems": https://topenddevs.com/podcasts/javascript-jabber/episodes/124-jsj-the-origin-of-javascript-with-brendan-eich https://topenddevs.com/podcasts/javascript-jabber/episodes/1... "I liked the fact that Joy signed the trademark agreement" To clarify: it was true at some point because of personal reasons, and is not anymore the case, right ?