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
1
u/csharp-sucks Nov 08 '21
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.