Proper way to handle "alias this" deprecation for classes

Chris Piker chris at hoopjump.com
Wed May 10 22:57:13 UTC 2023


On Wednesday, 10 May 2023 at 20:25:48 UTC, H. S. Teoh wrote:
> On Wed, May 10, 2023 at 07:56:10PM +0000, Chris Piker via 
> Digitalmars-d-learn wrote: [...]
> I also suffer from left/right confusion, and always have to 
> pause to think about which is the right(!) word before uttering 
> it.
Oh, I though was the only one with that difficulty.  Glad to hear 
I'm not alone. :-)

I have a tendency to think of things by their purpose when 
programming but not by their location on the line or page.  So 
terms such as "writable" versus "ephemeral" or "addressable" 
versus "temporary" (or "register"), make so much more sense to me.

Back on the ref issue for a moment... I'd imagine that asking the 
compiler to delay creating a writable variable until it finds out 
that a storage location is actually needed by subsequent 
statements, is a tall order. So D chose to introduce programmers 
to lvalues and rvalues head-on, instead of creating a leaky 
abstraction.


More information about the Digitalmars-d-learn mailing list