Poll: Would you like to try const-by-default or not?

Jarrett Billingsley kb3ctd2 at yahoo.com
Tue Jun 12 16:21:17 PDT 2007


"Sean Kelly" <sean at f4.ca> wrote in message 
news:f4mjat$10c1$1 at digitalmars.com...

> I'd like to at least try option 2.  It sounds appealing in theory, but 
> it's hard to say whether I'd actually like it without actually using it. 
> My only stipulation is there there must be some way to do this:
>
>     void fn( char[] a ) { a[0] = 'a'; }
>
>     fn( ("xxx".dup)[0 .. 1] );
>
> ie. pass a temporary array (slice, etc) as a parameter whose contents are 
> modifiable.

Oh absolutely.  CbD kind of implies a "non-default" case where it wouldn't 
apply :) 





More information about the Digitalmars-d mailing list