The dictionary says that advice can only be used in the singular. But in a specific part of computer science (aspect-oriented programming) this word is used to reference some object that implements some specific functionality. There can be many such objects in the program, and sometimes it's required to say something about a number of them. Is it OK to use advices in this case, or is it absolutely wrong? What is the best solution?
When I program objects, I usually refer to them as "object instances". For example, "all
Dog instances are instructed to
bark()" (or something on those lines). You could similarly say "Advice instances". It's clearer (immediately notifies the reader that you're referring to multiple object instances), grammatical, and allows you to format the name of the object differently (as many people do when referring to code components).
Advice is a mass noun, so the concept of plurality doesn't apply (1). In fact, advice is number one on the list of Wikipedia's examples mass nouns.
So just like there's no singular-plural distinction of milk, knowledge, or volatiliy, there's no such distinction in advice.
For your specific case, I'm not familiar with AOP terminology, but from reading Wikipedia articles on the subject, it would appear that the early coiners of terms in AOP ran into the same issue as you are, advice being a mass noun, and used it as a part of a compound noun instead (e.g., advice function or advice bodies) or with counts (e.g., pieces of advice).
I personally see no problem with you coining a new use of advice as a count noun as a shorter version of advice function. If you and your colleagues agree to use that terminology, go ahead; it may even spread.
- It does tend to align with singular forms in paradigms, like subject-verb agreement (the advice is good vs. *the advice are good) and pronominal agreement (listen to his advice; it's helpful vs. *listen to his advice, they are helpful). This does not necessarily mean that we can call mass nouns "always singular", though.
I think "advices" is perfectly okay, since we're talking jargon here.
If you look at the PostSharp documentation (a popular .NET aspect-oriented framework), you'll see a namespace called PostSharp.Aspects.Advices. Google searches for "advices" coupled with other tools like AspectJ also show that it's common usage.
The British linguist David Crystal suggests here that the English of native speakers is being influenced by the English of non-native speakers to the extent that words like advice, commonly thought of as being uncountable, are now occurring in the plural in native speech.
List of objects that implement advise , or in OOP if you are using interfaces one can say the list of classes that implement the IAdvice interface, or T : List< IAdvice > (psudo code).
then you can be more specific e.g.
Set of all the T's or Set of some of the T's
Mixing the language of set theory would give you more control over the range of T classes/categories/sets you want.
Almost all of these answers are coming from the wrong direction. To quote the relevant part of the question (with emphasis added by me):
But in a specific part of computer science (aspect-oriented programming) this word is used to reference some object that implements some specific functionality. There can be many such objects in the program, and sometimes it's required to say something about a number of them.
Most answers here are talking about many
pieces of advice and coming up with a single word for it. But the question is asking about object instances that contain advice, so the only real answer, without getting the data in the objects confused with the objects, is
Now, if the asker is intending to come up with one object that contains many advice objects, the best way to name it would be to take advantage of another programming convention and call it something like
I looked into AOP a little bit with my under-qualified eye and I see that in the documentation for various frameworks (such as Spring), the authors never use a plural form. This is important, because this is "jargon" (specialized language) and words and usages can be created which are considered wrong in normal usage. The documentation writers haven't seen fit to break with normal usage.
However, I think your examples give an insight to the use of advice objects: they can be ignored. I would rewrite your examples (which are not quite grammatical to begin with BTW):
“If we use proxied reference to data accessing object, then all its advices are applied.”
If we use a proxied reference to the data accessing object, then all of the advice types are executed.
"If we use unproxied reference to the object, none of advices is applied.”
If we use an unproxied reference to the object, then none of the advice types are executed.
EDIT: Use of a capital letter might "buy you a pass" since it would be a signal to the reader that the word is to be accepted as a proper name:
If we use an unproxied reference to the object, then none of the Advices are applied.