Another way to illustrate what I mean:

The feature will be used /to annotate/ (add metadata) and the so
/annotated/ data has additional /attributes/ afterwards.

Trying building the sentence if the feature is called /attributes/.

  @entity
  @invariant
  final class A {

    @inject
    private static $x;

    @test
    public memoized function f(){}

  }

r = reflect A
r.getModifiers   = [ final ]
r.getAnnotations = [ entity, invariant ]
r.getAttributes  = [ final, entity, invariant ]

r = reflect A.x
r.getModifiers   = [ private, static ]
r.getAnnotations = [ inject ]
r.getAttributes  = [ private, static, inject ]

r = reflect A.f
r.getModifiers   = [ public, memoized ]
r.getAnnotations = [ test ]
r.getAttributes  = [ public, memoized, test ]

Note that there are programming languages that allow adding of metadata
solely via annotations: Ceylon. No matter the data to annotate. Hence,
in Ceylon no differentiation would be made between modifiers and
annotations. However, one could check the actual annotation type to
determine what it is.

https://modules.ceylon-lang.org/repo/1/ceylon/language/1.2.2/module-doc/api/index.html#section-annotations

-- 
Richard "Fleshgrinder" Fussenegger

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to