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

Walter Bright newshound1 at digitalmars.com
Sun Jun 10 15:19:06 PDT 2007


Bill Baxter wrote:
> * "having same type defaults is better for generics"
>   (maybe...but I'm not convinced. If you have powerful enough 
> metaprogramming it shouldn't be hard to strip const from a type tuple, 
> or add it.  And people do far more programming than meta-programming.)

This is a good point. With const-by-default, you have function type 
declarations behaving *fundamentally* different from other declarations. 
Given the metaprogramming ability to use tuples to declare parameters, 
doing function template type deduction for parameters, and type 
inference on parameters, making this fundamentally different may wind up 
really screwing things up.



More information about the Digitalmars-d mailing list