Annotation extension with CONDYN
Jeremy Barrow
jeremy.a.barrow at gmail.com
Sat Nov 24 19:13:20 UTC 2018
Hey everyone,
As I was working on something relating to annotations,
I realised we still use the typical pattern of using a class or some other
constant to refer to specific functionality.
With things like MethodHandles and a lot more recently CON DYN surely it's
possible to embed a lot more into an annotation?
Is there any specific technical restriction, because I would love being
able to do something like:
https://gist.github.com/Jezza/7d5bedaadbe3adcb65bb6e4981de9901
Right now we have to do something like:
@Annotation("onBefore"), and then do the necessary things behind the scenes.
This does raise questions such as being able to enforce signatures, etc,
but I don't think that's a problem as it's no different to what it was
before, and it's effectively the same as, say, accepting a MethodHandle as
a parameter.
Cheers,
Jeremy.
More information about the amber-spec-comments
mailing list