Why do we have transitive const, again?

Jonathan M Davis jmdavisProg at gmx.com
Fri Sep 23 20:01:35 PDT 2011


On Friday, September 23, 2011 19:43:53 Mehrdad wrote:
> On 9/23/2011 7:21 PM, Andrei Alexandrescu wrote:
> > On 09/23/11 20:52, Mehrdad wrote:
> >> I run into this problem and similar ones so often that it's driven me
> >> away from D, as much as I was a fan. If you have a nice solution then
> >> please let me know.
> > 
> > This strikes me as a pretext. If you frame that obscure matter as a
> > showstopper, you'll have no trouble finding another one the moment
> > you're given a solution.
> > 
> > Andrei
> 
> o_O... What's so "obscure", exactly? Are you asking for some sort of
> "proof" for the fact that that problem was a showstopper for me or
> something?

The problem is easy enough to get around - just don't use const when you need 
lazy loading or caching (though obviously that restriction is annoying). The 
fact that _one_ feature in the language does not work the way that you'd like 
it to (and that that issue only occurs when you use it in a particular way 
which many people would never try to do) would be a showstopper for you using 
the language (especially when there's a simple, if annoying, workaround) would 
seem to indicate that it doesn't take much for you to give up on D (or 
whatever language you might be trying to use). So, even if this one issue were 
fixed, it presumably wouldn't take much for you decide that some other 
relatively small item in the language was a showstopper. I believe that that's 
all he's really saying.

- Jonathan M Davis


More information about the Digitalmars-d mailing list