Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 7 years ago.
Improve this question
I'm a .NET developer learning Java EE. These two concepts seem to serve the same exact purposes in either system.
So which framework gets credit for inventing them?
.NET metadata was, I believe, introduced in .NET 1.1 which was released 3 April 2003 (it appears to be already in before that?). The Java annotations were proposed as JSR-175 on 19 March 2002 which was approved on 30 September 2004 and became part of Java SE 5.0 which was released the same day.
It's unclear when exactly .NET metadata was proposed, but when it comes to the first release, .NET wins.
Attributes have been part of the CLR since its inception. I have an old prerelease spec of C# printed out from November 1999 that describes them, but the earliest reference I can find is the C# 1.0 spec from 2001. This was clearly several years before the feature was added to Java.
EDIT: The book, C# Programming with the Public Beta, was published in 2000 and mentions attributes.
I believe they came first with .NET; Java 5 followed.
Java has unfortunately been behind the
curve on language improvents despite
the fact it was the language C# was
modeled after.
Pierreten's comment is correct, but I think there are several factors that explain it:
- Java has a longer legacy than .NET,
and maintaining backward
compatibility is a high priority
- Java community process takes longer to build consensus; Microsoft doesn't need any such consensus if it believes a feature is needed.
- Sun's financial decline and eventual purchase by Oracle meant fewer resources were available to devote to Java.
- Sun has lost the minds that drove Java forward at its height (e.g., Bill Joy, James Gosling). Anders Hejlsberg and Eric Lippert are still with Microsoft.
(Eric Lippert left Microsoft in Jan 2013 to join Coverity.)