Re: [ANN] Scala 2.7.0-RC1
Lex Spoon <lex <at> lexspoon.org>
2008-02-12 22:24:48 GMT
Judson, Ross wrote:
> Do implicits work with the annotated types? This can yield some nice
> benefits, like automatically doing a security check on a session object
> if the callee declares a @SecurityChecked annotation on the parameter.
> Having an extra "dimension" of type information will find many uses.
>
That does sound useful, but it would mean that an annotation can change
the behavior of the program even when no plugins are loaded. I lean
towards Bracha's view, and that of Java's annotations, in suspecting
this kind of overloading would be too tricky for programmers to
understand what is happening. Thus, leaving aside reflection, the
behavior of a program should not change if you remove annotations.
What you could do, now, is *track* whether security checks have
happened, and generate compile time errors if the programmer claimed
something is @SecurityChecked when this cannot be verified.
-Lex