Hacker News new | ask | show | jobs
by pjmlp 2817 days ago
How come C# generics are a copy of Java when they were invented first and the only reason they didn't make it to 1.0 was not to delay the release schedule?

Java annotations are based on .NET atributes, and initially had a clusmy implementation requiring an annotations processing tool until they finally got integrated into javac.

LINQ paved the way to more FP acceptance among enterprise developers. Check "confessions of a language salesman" from Erik Meyer.

Also .NET always had AOT/JIT from the very beginning, whereas AOT was tabu at Sun and only commercial JDKs always had it as option.

1 comments

Hang on, Wikipedia says Generic Java was 1998, generics were adopted in J2SE 5.0 in 2004, and C# 2.0 wasn’t released until 2005. Am I missing something? I’m sure there was cross-fertilization both ways but it seems like Java generics came first.

LINQ is a good one though, that’s definitely a .NET innovation.

Yes you are missing the remaining part of the sentence "the only reason they didn't make it to 1.0 was not to delay the release schedule".

Don Syme of F# fame was leading generics research since 1999, while they were designing the CLR, but it was clear they would have to delay 1.0 if they wanted to included them, so they just went ahead without them for 1.0 release.

https://blogs.msdn.microsoft.com/dsyme/2011/03/15/netc-gener...

https://blogs.msdn.microsoft.com/dsyme/2012/06/19/some-histo...

https://blogs.msdn.microsoft.com/dsyme/2012/06/26/some-more-...

Additionally C#, like Java, also had CMU, ML, Ada, Eiffel, Sather, BETA, C++ and Modula-3 as possible sources of inspiration for generics.

Just lost out in a photo finish, then (over a span of 5 or 6 years...!)

But Generic Java was started in 1998 (IIRC originally as part of Pizza). It seems reasonable to say that Java covered this ground first.

Faire enough I forgot about Pizza.

Although what Java got wasn't all of Pizza, which had better generics.

If you trust Wikipedia for your answers, I have a bridge to sell you.
Combined with other sources, and when it fits with my own recollection, sure.

I played around with Pizza (AKA Generic Java) in the late 90s, before the launch of C#.