开发者

In which language did attributes first appear [duplicate]

开发者 https://www.devze.com 2023-01-17 23:04 出处:网络
This question already has answers here: What was the Historical Precursor for .NET Attributes? (3 answers)
This question already has answers here: What was the Historical Precursor for .NET Attributes? (3 answers) 开发者_开发知识库 Closed 8 years ago.

It seems that almost all features in C# were borrowed from another languages (OOP from Java, generics (parametric polymorphism) and lambdas from ML family, LINQ from Haskell's monads and dynamic from dynamic languages), but I don't know the origin of attributes(annotations in Java world). Is C# the first language that introduced attributes?


I saw attributes for the first time as method or parameter annotations in COM IDL (Interface Definition Language) files back in C++ world. I do not know if they were invented there or not. http://msdn.microsoft.com/en-us/library/aa367042.aspx


I think it was UML with stereotypes.

http://en.wikipedia.org/wiki/Attribute-Oriented_Programming

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号