Came here to say exactly this. The language you are describing already exists. HN seems hellbent on pretending it hasn’t changed in 10 years but Dart was very much designed from the POV of what if we took the good parts from both Java and JS and left the bad bits behind and compiled it to native machine code. It’s actually a really good outcome that’s incredibly underrated.
My main gripe with Dart is their package manager. Unlike NPM or Cargo, it is possible to get conflicting diamond dependencies. The lack of shared memory concurrency is also disappointing.
That is the joke. Though probably Kotlin, not Dart, as the features described are exactly what Kotlin has.