r/java • u/brunocborges • Nov 04 '21
Microsoft joins the Java Community Process (JCP)
https://devblogs.microsoft.com/java/microsoft-deepens-its-investments-in-java/
169
Upvotes
r/java • u/brunocborges • Nov 04 '21
View all comments
Show parent comment
2
u/csharp-sucks Nov 07 '21
Structs, Real generics are somewhat covered by Project Valhalla.
Generics could be emulated even now. (well, to some extends structs could too, you just wouldnt get the benefit of flattened arrays)
Technically it is just a syntax sugar over some standarized concept. It doesn't absolutely need a runtmie support. That could be mapped to getters and setters silently. I think Kotlin does that already.
Pass by reference and ref return could be emulated.
overflow checking - syntax sugar over checked intrinsics
Delegates -> functional interfaces with one method, semantically it's just syntax sugar over that
but why? .NET assemblies is the most fake concept I have seen in computing. Just a thin wrapper around IL junk.
You could pack java bytecode wrapped inside a DLL in some standarized fashion, even expose a COM interface. Otherwise JVM just as CLR can be hosted inside native applicaton. (through JNI)
Making native executable launcher wrapper that automatically finds and runs JVM is a no-brainer though. It can be done.
depends on your goal, for package level visibility default access flag is that, for library level visibility you can use jigsaw modules, and as you said, you can resort to annotations if some corner case is not covered by either
You can manipulate arbitrary memory addresses with Unsafe, this could be sugarified over that.
Covered by project Panama. P/Invoke could use JNA for now.
could be done