Interesting rant about Scala's issues
Walter Bright
newshound2 at digitalmars.com
Fri Apr 4 13:04:28 PDT 2014
On 4/4/2014 12:05 PM, bearophile wrote:
> And with "enum precondition" in the succ() function you can do both cases with a
> single function:
>
> array[Index.A.succ] = t;
> auto i = Index.A;
> array[i.succ] = t;
What about i+10? Do you expect the person to write
i.succ.succ.succ.succ.succ.succ.succ.succ.succ.succ? Sorry, that sux!
And what about:
int j;
array[i+j]
?
And forcing the user to use templates to do any logical or arithmetic operations
on enum operands? It's just awful.
More information about the Digitalmars-d-announce
mailing list