On 27.05.2012 17:13, bearophile wrote:
I have found two Scala annotations.

1) The first one is @switch:
http://www.scala-lang.org/api/current/scala/annotation/switch.html

Currently this D2 code compiles:

void main() {
int x = 2;
int y = 2;
switch(x) {
case 1: break;
case y: break;
default:
}
}


IMHO if you use annotations for *this* then your language is as good as dead.
There are far better things to aim annotations at.

2) The second is @implicitNotFound:
http://www.scala-lang.org/api/current/scala/annotation/implicitNotFound.html


More info:
http://suereth.blogspot.it/2011/03/annotate-your-type-classes.html




--
Dmitry Olshansky

Reply via email to