4 ms·
I seriously doubt the ratio of Scala vs C++ for implementing the JVM is 1:300.
by RcouF1uZ4gsC 3y ago
I seriously doubt the ratio of Scala vs C++ for implementing the JVM is 1:300.
- patrec 3y agoHe's not saying that. What he is saying is that are simple, non-production quality implementation in Scala is much more amenable to experimentation than a sophisticated, production-quality implementation in C++ that weighs in at 300x the LOC.
- RcouF1uZ4gsC 3y agoBut a simple non-production quality implementation in C++ would also be amenable to experimentation and not have the bootstrapping issues as well as provide an easier starting point to incorporate more of the existing optimizations as desired.
- eindiran 3y agoThat is true, but the author of Metascala wanted to write it in Scala. Other people are free to write a simple C++ implementation of the JVM themselves.
- valenterry 3y agoProbably not, because JVM users are much more likely to be more proficient in Scala/Java than in C++.
- cempaka 3y agoI'm sure it's not complete, but I also wouldn't be surprised if 99% of what's in HotSpot is optimization tweaks and performance boosts which aren't essential to the JLS.
- cmrdporcupine 3y agoIt's also unclear to me if the architectural assumptions made in GC & VM engineering 20 years ago still apply today. I'm not an expert in this field, so take with a grain of salt... but I do wonder if a VM engineered from the ground-up today targeting recent ISAs would look substantially different.
- xmcqdpt2 3y agoIt's mostly GC and JIT and a huge amount of corner case interactions between them. And also the many supported instruction sets.