3 ms·
I know all languages evolve over time, but it seems like languages on VMs like Java have the ability to radically reinvent themselves while not losing compatibi
by Decabytes 4y ago
I know all languages evolve over time, but it seems like languages on VMs like Java have the ability to radically reinvent themselves while not losing compatibility with old code. For example the improvements/differences in ideology from Java that are explored with languages like Kotlin, Scala, and Clojure.
- chmod775 4y agoI don't see what is special about VMs that would impart any exceptional ability to reinvent a language that (compiles into something that) runs on it. As opposed to what? There's more "modern replacements" for the C language that are backwards compatible with existing code/binaries than I can count.
- remexre 4y agoOftentimes there's some optimization that it'd be really nice if you could perform, but it's possible to write code that the optimization would result in a miscompile of without analysis that's too hard to do without killing compile times. (And often, popular large frameworks do all these terrible things hundreds of times per second!) By compiling to a VM like the JVM, you expose the opportunity for speculative optimizations to run and be falsified at runtime without affecting correctness. This isn't a silver bullet, but can certainly be useful for an optimizing compiler developer.