| ▲ | sheept 3 days 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. | ||||||||||||||||||||||||||||||||||||||
| ▲ | ivolimmen 3 days ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||
I personally would never compare the two. Someone said: java to JavaScript is like car to carpet. And I completely agree with that. | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| ▲ | hawk_ 3 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
Java 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. | ||||||||||||||||||||||||||||||||||||||
| ▲ | nalekberov 3 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
> 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. | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| ▲ | ErenayDev 3 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
> 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-techn... | ||||||||||||||||||||||||||||||||||||||
| ▲ | grishka 3 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
JavaScript still doesn't have proper integers. | ||||||||||||||||||||||||||||||||||||||
| ▲ | Altern4tiveAcc 3 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
The withdrawn of that proposal made me so sad. It would be amazing for JS as language, specially with certain use cases. | ||||||||||||||||||||||||||||||||||||||
| ▲ | LoganDark 3 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||
I'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?? | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||