any news on const/invariant?
    Bill Baxter 
    dnewsgroup at billbaxter.com
       
    Wed Nov 28 15:29:20 PST 2007
    
    
  
Walter Bright wrote:
> Bill Baxter wrote:
>> Ok, but that seems to differ from your default position on other 
>> topics.  Usually I see you saying we should do things to not confuse 
>> C++ coders.  "If it looks like C++ it should behave like C++" is the 
>> impression I've gotten in the past.   But maybe you're gaining enough 
>> confidence in D these days that you're not as concerned about that any 
>> more. :-)
>>
>> ... So can we talk about the fall-through default in switch statements 
>> again?  :-)
> 
> No, because to break things in a way that results in an error message is 
> ok, but breaking them so things silently behave differently is not ok.
Doesn't
    const int func();
break things in a way that might not caught by a compiler?
>> And the only commentary I've heard on that feature from D users has 
>> been negative.  There could be a "silent majority" in favor of it, but 
>> I doubt it.
> 
> But I've seen converted code that used it.
That doesn't mean they consciously used it, or that they would mind 
changing it if it were pointed out to them.  Heck I might even be using 
it in OpenMesh/D.  But that's just laziness.  If someone points out to 
me where I am using it, I will change it.  If the compiler pointed out 
to me that I was using it, I would change it.
Don't know if I'm like everyone there.
But there is also the issue with C style function pointer declarations. 
  Wasn't that allowed for a while then eventually gotten rid of in favor 
of "just one way to do it"?
--bb
    
    
More information about the Digitalmars-d
mailing list