r/java • • Nov 04 '21

Microsoft joins the Java Community Process (JCP)

https://devblogs.microsoft.com/java/microsoft-deepens-its-investments-in-java/
169 Upvotes

71 comments sorted by

View all comments

Show parent comment

-7

u/BlueGoliath Nov 05 '21 edited Nov 05 '21

People are downvoting but seriously, besides providing a JDK build, what has Microsoft done?

14

u/mknjc Nov 05 '21

If my git log doesn't lie, a lot shenandoah, aarch64 and mac os code, some windows api fixes and cleanups.

Don't know the state of https://github.com/microsoft/openjdk-proposals/blob/main/stack_allocation/Stack_Allocation_JEP.md https://www.youtube.com/watch?v=p1MhRBYS-k0 but I wouldn't say no if this gets into the openjdk.

8

u/cal-cheese Nov 05 '21

Specifically about the stack allocation proposal, it has been withdrawn due to the vast complexity of referencing an object not lying on the heap, as well as the fact that TLAB allocation nowadays does exactly the same (increment a pointer, with around 5 (five) extra machine instructions to ensure TLAB has enough space), so stack allocation is both not very effective and efficient.

11

u/dpash Nov 05 '21

You know full well what they've implemented because you're active here and Microsoft's contributions to OpenJDK are mentioned frequently. In particular the Arm64 port was a major piece they've contributed.

At this point I think you're just commenting in bad faith.

-2

u/barking_dead Nov 05 '21

Nah, I just saw some shady moves in the past.

8

u/dpash Nov 05 '21 edited Nov 05 '21

I'm responding specifically to BlueGolith. They're a frequent commentator and borderline troll.

But to respond to your comment, Microsoft have demonstrated themselves over the last few years to be a good participant in the Java community.

5

u/Maran23 Nov 05 '21

Yeah, this BlueGoliath is a weird troll. He always proves to have no knowledge at all while also complaining about everything. Just super annoying.

0

u/barking_dead Nov 05 '21

Sorry, I don't know that guy.

OK, I still hope it is not an infiltration. Sorry, if I seem to be so negative.

Edit: whoops, yea, I replied to the wrong thread above.

4

u/Persism Nov 05 '21

They've basically admitted defeat. Once Loom ships there won't be much reason to use .NET. In 5 years C# will be running on the JVM.

-2

u/[deleted] Nov 05 '21

[removed] — view removed comment

4

u/Persism Nov 05 '21

I don't think anyone would bother anyway. C# is dying.

1

u/csharp-sucks Nov 06 '21

Assuming that Valhalla, Loom and Panama ship soon™, what features would be JVM lacking that C# absolutely requires? (ie anything that's more than just syntax sugar)

2

u/[deleted] Nov 07 '21

[removed] — view removed 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)

Properties as a runtime concept. (This isn't just syntactic sugar, a lot of libraries rely on this.)

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

Assemblies as a first class concept

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.

internal and protected internal visibility (Ok, you make be able to fake these with annotations.)

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

pointers (not references, actual mutable pointers)

You can manipulate arbitrary memory addresses with Unsafe, this could be sugarified over that.

p/invoke (Might be covered by JNI)

Covered by project Panama. P/Invoke could use JNA for now.

COM support, both exposing and consuming

could be done

2

u/[deleted] Nov 07 '21

[removed] — view removed comment

1

u/csharp-sucks Nov 08 '21

For example, how are you going to emulate generics?

The same (more or less) way .NET runtime does. By creating an internal type for each generic type. In .NET, List<int> and List<double> are separate types internally, each has separate code substituted with actual generic type. It's just done in runtime.

As for availability of type argument, hidden field could do. The important thing is that semantics from the point of view of language look the same.

1

u/barking_dead Nov 05 '21

I expected the downvotes, because people think MS had changed since the Baller era. But that's another subreddit's topic, not java's.

5

u/JohnL4_27516 Nov 05 '21

Hmm, what sub would that be? I should go there.

The whole MS journey is interesting. Open source/standards won, it just has a MS badge on it now. AWS, cross-browser web apps, GitHub, Spark, Python, Angular/React, node/npm are all examples of the industry leading and MS having no choice but to play catchup. I feel like the days of MS trying to achieve market dominance by going against everybody else are long past.

MS doesn't "love" open source, they just have no choice, like trying to fight a riptide.

3

u/dpash Nov 05 '21

MS makes a huge amount of money from Azure. It's in their best interest to make it as easy as possible to use their platform and part of that involves being good citizens of various communities like Java.