Perl-Apollo / Corinna

Corinna - Bring Modern OO to the Core of Perl
Artistic License 2.0
157 stars 19 forks source link

Proposal: introduce annotations #20

Closed cub-uanic closed 3 years ago

cub-uanic commented 4 years ago

Please consider adding annotations, accessible in run-time (like in Java). This will be useful for framework authors (like Spring / SpringBoot and others).

happy-barney commented 3 years ago

In perl world there already are two mechanisms capable of what java annotation does

With thoughts about extended slot mechanism it's possible to cover class / instance attributes as well as method arguments.

As for classes, consumption of role (trait is in fact only role) may do the same thing. Questionable entity is method. Following aforementioned patterns:

method foo {
    does 'Deprecated';
}

And there is behaviour of generated code ...

Ovid commented 3 years ago

This is resolved for the MVP. Further issues should be new tickets.