Stepping back and looking at constness from another angle.

Reiner Pope some at address.com
Mon Jun 4 22:42:02 PDT 2007


Jarrett Billingsley wrote:
> What I'm asking you more seasoned programmers, and those more experienced 
> with const-correctness to do, is to do something similar here.  Step back, 
> and have a look at what constness is for.  What problems does it solve?  Is 
> it necessarily the best way to solve them?  More importantly, what problems 
> does it introduce?  Remember, how the language _looks_ is just as important 
> as the features it has.  After all, what do you want to look at for hours on 
> end each day if you use it at your job?
> 
I may be off track, but I think that scope could also bring some easy 
efficiency benefits, especially for small programs. I can believe that 
most function parameters are 'scope.' Being aware of this could 
potentially allow many more variables to be stack-allocated. It may also 
solve the problem of lexical closures: the escape analysis they require 
could perhaps be done by scope.



More information about the Digitalmars-d mailing list