https://docs.oracle.com/javase/7/docs/api/java/lang/annotation/ElementType.h... ANNOTATION_TYPE Annotation type declaration CONSTRUCTOR Constructor declaration FIELD Field declaration (includes enum constants) LOCAL_VARIABLE Local variable declaration METHOD Method declaration PACKAGE Package declaration PARAMETER Parameter declaration TYPE Class, interface (including annotation type), or enum declaration Le 26/6/16 à 20:14, stepharo a écrit :
Clement
I do not think that we are talking about the same. You are not annotating an AST element. Of course with a convention you can add a method pragma to annotate an source entity that you are the only one to know that it is the right entity. To me this is different.
So in the paper I do not want to say that Smalltalk pragmas are equivalent to Java ones because do me they are not. I think that Java annotations are nicely integrated into the language too. And we cannot annotate (the AST element of temp, argument, class def, package and annotations themselves in Smalltalk). I will read more about Java Annotation to be more precise.
In Slang we use pragma to annotate argument and temporary variables and it works just fine.
Can you give an example on how you annotated it?
When you describe in Pharo classes and instance variables using Magritte you can do the same thing as just annotating them.
(You see I cannot annotate instance variables directly I can define a method with an annotation that tell me that an instance variable should be interpreted differently.).
Stef