Const template

Andrei Alexandrescu (See Website For Email) SeeWebsiteForEmail at erdani.org
Sun Jan 21 18:08:22 PST 2007


Bill Baxter wrote:
> Andrei Alexandrescu (See Website For Email) wrote:
> 
>> A template can't detect lazy properly. It's unclear what it means to 
>> assign to a lazy parameter. Lazy is a storage class that changes the 
>> access syntax. I believe lazy is ill-designed. Walter should have 
>> stood the pressure and refuse to implement it without a clear definition.
> 
> Well, the pressure, if any, was from you, the way I recall it.  There 
> wasn't any kind of community upswell around that one.  The way I 
> remember it was that 'lazy' just suddenly appeared out of the blue in D 
> 0.165 (http://www.digitalmars.com/d/changelog.html#new0165 -- the 
> 'expressions to delegates' bit), with Walter saying essentially "this is 
> going to change the game, trust me! Andrei convinced me!"
> 
> But maybe I'm remembering it wrong.
> 
> Either way, pressure is pressure, and perhaps Walter should have 
> withstood it regardless of where it was coming from... I just don't 
> think you can pin any ill results in this case on "the community".
> 
> Just trying to set the record straight here. :-)

The feature I suggested was conversion from expression to delegate, 
which has a couple of problems, but nothing earth-shattering. Then 
somehow lazy materialized as a storage class out of the blue, but with 
the delegate syntax upon use, which is not a horse nor a donkey.

Walter and I have worked carefully through inout, lazy, and const today 
and managed to figure a semantics that makes sense for all storage 
classes and combinations thereof. (The () use syntax of lazy will go away.)


Andrei



More information about the Digitalmars-d mailing list