suggestion: relaxing reqirements for version and mixin

Johan Granberg lijat.meREM at OVEgmail.com
Tue Apr 3 10:30:34 PDT 2007


Dan wrote:

>> > > Thomas Kuehne wrote:
>> > > > if( version(STRICT){a<200 || } a>0){
>> > > >     // blabla
>> > > > }
>> > > 
>> > > Both those features smack of textual processing to me.
>> > > 
>> > > "Modern languages should not be text processing, they should be
>> > > symbolic processing."
> 
> To me, that looks like the way it ought to be.
> 
> It also makes sense to me to allow:
> 
> x = switch(y){  <-- ask me about the implementation
>   case 3: 5;
>   case 2: 4;
>   case 7: 3;
>   default: 1;
> }

Why not use match instead of switch to avoid confusion, if it is named
switch people will expect fall-through? It is pater-matching and could be
extended past the current limited matching provided by switch, take a look
at ML if you have not done so. 



More information about the Digitalmars-d mailing list