On 4/28/2016 8:02 PM, Rowan Collins wrote: > Interesting; do you have a link to where this terminology is explained? > Most of the articles I've seen just refer to "attributes", and the link > you have doesn't really explain that at all, it has namespaces with > "annotation" in the name, but uses the word "attribute" everywhere in > the actual text. >
Yes, I provided many in the initial message, the Wikipedia link [1] explains it in detail and you may use it as reference for all the other questions you have here, since it answers all of them. Emphasize mine: > You can also use *attributes* to control memory placement, code > generation options or call/return conventions within the function > being *annotated*. > > --- https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html We /annotate/ data and by doing so we add /attributes/. The C language is a very good example where all attributes are directly called attributes because there is no other system available to add attributes. In PHP we have various means to add attributes, so does Java. *That* is why it is not a good idea to call a specific functionality /attributes/. On 4/28/2016 8:02 PM, Rowan Collins wrote: > According to this page, the syntax which applies an attribute to some > code is called an "attribute specification": > https://msdn.microsoft.com/en-us/library/aa664616.aspx > The word construct "attribute specification" is completely right, it specifies which attribute should be applied to the data. The functionality at our disposal to do so---addition and specification of attributes---is through annotating them. Hence, calling the functionality ... - Custom Attributes - Attribute Specifiers - Custom Attribute Specifiers - Extended Attributes ... or something in this vain would get my +1. However, all of them are rather bulky. On 4/28/2016 8:02 PM, Rowan Collins wrote: > Again, I've not seen anything saying that .net refers to the "public" > keyword as an "attribute", or in any way treats it as equivalent to the > attribute (or, if you insist, annotation) syntax. In fact, the article I > quoted earlier explicitly distinguishes the two, referring to "public" > etc as "method-modifiers", and seems clear to me that they are not the > same thing as attributes: > https://msdn.microsoft.com/en-us/library/aa664611%28v=vs.71%29.aspx > Method modifiers are a more specialized form of attributes and it makes sense to refer to them as such because it is less ambiguous than the word attributes. [1] BTW: /public/, /protected/, and /private/ are a special form of modifiers in general and called *access modifiers*: https://en.wikipedia.org/wiki/Access_modifiers On 4/28/2016 8:02 PM, Rowan Collins wrote: >> The name they chose is okay because Perl does not offer any other way of >> adding attributes to any kind of data in any way (at least none that I >> am aware off but I am not a Perl programmer). Hence, it is not too >> dangerous to call this functionality attributes as it would be in our >> context where many other attributes are already available. > > Surely under your definition scope modifiers like "local"/"global" and > "my"/"our" would be "attributes"? I think you're really clutching at > straws to distinguish this case from any of the others, just because it > doesn't agree with your assumptions. > As I said in the initial message, using the term /attribute/ is pretty much never wrong because the term /attribute/ is so generic. :P The only data without any kind of attributes is raw binary data without any meaning. Note that random data does not count, since randomness would be an attribute of the data. > a usually good quality or feature that someone or something has > > --- http://www.merriam-webster.com/dictionary/attribute On 4/28/2016 8:02 PM, Rowan Collins wrote: > By "confirmation bias", I meant that you'd gone out looking for > confirmation that people called them "annotations", rather than > researching what each language calls them. > Actually I checked the dictionaries for the actual definition. This is also how I documented it in the initial message. All additional language links were only used to proof that Java is not the only language that uses the term and that the term is always used in the context. On 4/28/2016 8:02 PM, Rowan Collins wrote: > For instance, you linked to a Rust page, which happened to contain the > word "annotation", but on closer inspection is actually using the terms > in exactly the opposite way from you: the "lifetime annotation" here is > a specific syntax to do with lifetimes, and is an "annotation" in the > loose sense of "you are annotating the source code". Meanwhile, in the > menu on the left, we can see a section on "Attributes", which look much > more like arbitrary metadata of the sort we are discussing right now: > http://rustbyexample.com/attribute.html > That is why there is an empty line between the pages that are actually documenting the usage of an annotation functionality and the pages that are using the term annotation correctly in natural language to describe something. Again, it is about language and terminology. Here is the relevant formatting again, note the dots and empty line: On 4/27/2016 10:11 PM, Fleshgrinder wrote: > http://ceylon-lang.org/documentation/1.2/tour/annotations/ > http://clojure-doc.org/articles/ecosystem/core_typed/start/annotations.html > https://www.dartlang.org/effective-dart/style/ > ... > > https://rubygems.org/search?utf8=%E2%9C%93&query=annotation > http://rustbyexample.com/scope/lifetime/explicit.html > https://www.google.de/search?q=javascript+annotation > ... > On 4/28/2016 8:02 PM, Rowan Collins wrote: > I think a survey of what different languages call their metadata > features would be interesting, but so far, I'm not seeing a clear bias > in favour of one or the other. > > Like I say, I personally prefer the term "annotations", but I'm not > going to discount the evidence that major languages like C#/.net, Perl, > and Rust have chosen the name "attributes" instead. > > Regards, Me neither, I am saying that the term is too generic and that we should use the term annotation in order to make it unique, easily understandable, non-ambiguous in terms of natural language and not in terms of what others use or do. [1] https://en.wikipedia.org/wiki/Attribute_%28computing%29 -- Richard "Fleshgrinder" Fussenegger
signature.asc
Description: OpenPGP digital signature