const, final, scope function parameters

Walter Bright newshound1 at digitalmars.com
Sun May 27 13:47:12 PDT 2007


Regan Heath wrote:
> Ahhh, I think I see what you're concerned about.  As in this example?
> 
> mutable int gx;
> void foo(int y) {  //y is scope const final
>   mutable int z;
> }

Yes. Even I wouldn't use such a language :-(

> Why can't we apply 'scope const final' to function parameters only?

Because it knocks people for a loop - gives a bad first impression.



More information about the Digitalmars-d mailing list