digitalmars.D - Re: strict
- bearophile <bearophileHUGS lycos.com> Feb 15 2010
BCS:I Like the idea but I think that is a bit /to/ explicit. It makes me think of the declared exceptions thing in Java. I don't remember exactly what the problem is there (I've done next to no Java) but being overly explicit seems to me to be an invitation for problems.
As I have designed it now it's something optional, you don't have to use outer() if you don't want to use it. And even if you use it, you can use it in just one function in isolation (if you apply outer to a class/module all its methods/callables will need the annotations). So I think it's very different from Java checked exceptions, that are a little viral. Another nice thing of this idea is that you don't need to modify or remove things from D2 to implement it, it seems a purely additive change. Bye, bearophile
Feb 15 2010