4 ms·
Could you elaborate on what about those three languages? Are you talking about copying GCs vs mark and sweep? Thanks.
by bogomipz 11y ago
Could you elaborate on what about those three languages? Are you talking about copying GCs vs mark and sweep? Thanks.
- pjmlp 11y agoJava is one of the few languages that only has reference types. All the languages that I referenced have value types in the same lineage as Algol derived languages. This means that you can make use of the stack, global statics, structs of arrays, arrays of structs and so on. The GC only comes into play when you make use of the heap, of course. Also the GC has a more rich API, given that besides Eiffel, the other languages are system programming languages. So you can let the GC know that certain areas aren't to be monitored or released right away (manual style). So given that you have all the memory allocation techniques at your disposal the stress on the GC isn't as big as in Java's case. But sadly none of those earned the hearts of the industry. The closest you have to them are D (which deserves a better GC implementation) and the improvements coming to .NET Native via the Midori project.
- bogomipz 11y agoThanks for the explanation. This makes me want to read up on Algol and Eiffel. Do you have any recommendations? It's funny I like Algol has finds it's way into a lot of discussions lately.
- bogomipz 11y agoBut surely you could implement "global statics, structs of arrays, arrays of structs" in Java(classes with public members) as well even if it lacks value types(aside from primitives that is) no?
- pjmlp 11y agoYes, but you won't gain much given the prevalence of references. You will need to decompose the classes across multiple arrays, thus leading to very hard to maintain code.
- Terr_ 11y ago>Java is one of the few languages that only has reference types. Uhm, aren't those "primitives"? Or did you mean user-definable value-types?