Unofficial wish list status.(Jul 2008)

Jason House jason.james.house at gmail.com
Mon Jul 21 11:20:40 PDT 2008


Walter Bright Wrote:

> Don wrote:
> > What if the community concensus remains that const is just too 
> > complicated, without enough benefit?
> 
> A simpler const system (such as what C++ has) has little benefit, and 
> all the other const proposals were much more complex.

I'm interested enough in the new const system to try it out, but my projects are dependent on Tango.

I do have a few concerns about the const system, but nothing big enough to keep me from trying it.

By far, my biggest complaint is that the const system makes only one of the following two methods compile.  It forces programmers to settle for using global variables to bypass const restrictions.  It also touches upon why the purity is required when doing multithreading.  I can't fully embrace const until it stops encouraging global variables and the gap between purity and const is reduced/eliminated.

=============
logFile log;
class foo{
  void bar() invariant{
    log.write("Hello World");
  }
}
=============
class Foo{
  logFile log;
  void bar() invariant{
    log.write("Hello World");
  }
}
=============



More information about the Digitalmars-d mailing list