Rah rah I hope the authors peek on HN and see that their work has baying fans :)
Rah rah I hope the authors peek on HN and see that their work has baying fans :)
You can do manual memory management, GC free code blocks and there is unsafe.
Additionally C# 7.x has safe stack allocation, spans, references to stack allocated data.
Looking forward to have some of those goodies in Java as well.
How much of those are the direct result of having value types in the language?
As far as the other features you mentioned, it would be nice to have them in the JVM as well.
They were already available in other languages like Modula-3 and Oberon(-2) before Java came to be, but Java team decided it was too complicated for their target audience.
Just like Sun was religiously against AOT, a feature only available in commercial third party JDKs, they also believed it was a matter of making the JIT good enough for escape analysis.
Thankfully the .NET team had other beliefs.
Up to 7.3 you could only stack allocate arrays (alloca() style) inside unsafe code blocks.
Starting with 7.3 you can safely stack allocate array of value types.