3 ms·
It's pretty interesting that while both languages still receive new features, Java seems to stay ahead of JavaScript: - Java has long had a modern replacement
by sheept 2mo ago
It's pretty interesting that while both languages still receive new features, Java seems to stay ahead of JavaScript:
- Java has long had a modern replacement for Date, while JavaScript's recently standardized Temporal API still isn't supported in Safari.
- Java has switch expressions, while JavaScript, despite its Scheme influence, does not.
- And now Java is getting value objects, while JavaScript's equivalent tuples & records proposal has been withdrawn.[0]
JavaScript was not developed as a fork of Java, but much of its basic syntax still resembles Java, so I think it's fair to compare them.
[0]: https://github.com/tc39/proposal-record-tuple https://github.com/tc39/proposal-record-tuple
- LoganDark 2mo agoI've been annoyed too by the lack of Temporal support in Safari. It's supposedly behind a --useTemporal flag, but I've never been able to get flags to work even when launching the binary directly, and I can't find anything in developer options or feature flags settings either so like. Does it even exist at all??
- dwaite 2mo agoIt is enabled by default in STP, so presumably it will launch alongside the 27 releases. Note Temporal was in the Ecmascript 2026 release back in March.
- hawk_ 2mo agoJava is to JavaScript what a Car is to Carpet. Very different beasts, though a lot of V8 work was inspired by Hotspot that's just because of common VM patterns not the syntax of the languages.
- ivolimmen 2mo agoI personally would never compare the two. Someone said: java to JavaScript is like car to carpet. And I completely agree with that.
- kleiba2 2mo ago> Someone said: java to JavaScript is like car to carpet. You mean the sibling who commented five minutes before you?
- Yokolos 2mo agoThe saying has been in use since at least 2018, so I think "someone" is accurate. https://www.keycdn.com/support/difference-between-java-and-javascript https://www.keycdn.com/support/difference-between-java-and-j...
- germandiago 2mo agoReminds me of one of C++'s talks from Andrei Alexandrescu: "std::allocator is to allocation what std::vector is to vexation". There was another transparency inside: "std::allocator is to allocation what alligator is to allegation".
- inigyou 2mo agoas ham is to hamster
- inigyou 2mo agoas ant is to antidisestablishmentarianism
- nalekberov 2mo ago> JavaScript was not developed as a fork of Java, but much of its basic syntax still resembles Java, so I think it's fair to compare them. It's absolutely irrelevant to compare these two languages. Calling the former "Javascript" was just a marketing trick.
- inigyou 2mo agoThe original version was Scheme, but they made it look like Java for marketing, too.
- cesarb 2mo ago> It's absolutely irrelevant to compare these two languages. Calling the former "Javascript" was just a marketing trick. Playing devil's advocate: back when you still could use Java in the browser, you could use Javascript to script your Java applets.
- ErenayDev 2mo ago> Java has long had a modern replacement for Date, while JavaScript's recently standardized Temporal API still isn't supported in Safari. i think Temporal API added in latest preview version of safari. https://webkit.org/blog/18182/release-notes-for-safari-technology-preview-249/ https://webkit.org/blog/18182/release-notes-for-safari-techn...
- Altern4tiveAcc 2mo agoThe withdrawn of that proposal made me so sad. It would be amazing for JS as language, specially with certain use cases.
- grishka 2mo agoJavaScript still doesn't have proper integers.