Hacker News new | ask | show | jobs
by megous 2807 days ago
Some historical perspective:

Some languages picked it up along the way. So in my case, I only first found out about closures in JS, after going through several popular languages, that got closures only later on: Pascal, C++, PHP...

2 comments

Then again, Lisp, Smalltalk, Haskell, etc. predate JS, from a historical perspective.
Popular languages?
This is especially important when considering what you'll see in codebases.

e.g. Java may be adding support for more async stuff, but most of the Java codebases I've worked with won't use it.

Async-await is just syntactic sugar over futures/promises and java has those for decades.
It only got the promise equivalent (CompletableFuture and CompletionStage) in java8, which is hardly "decades" ago, and a lot of common stuff like JDBC doesn't support it, so using it can be quite a pain. And that's not to mention the disaster that is checked exception interoperability with the default Java functional interfaces that force constant workarounds...