Herb Sutter's CppCon talk "Extending and Simplifying C++: Thoughts on Pattern Matching using `is` and `as`"

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Nov 1 23:33:31 UTC 2021


On Mon, Nov 01, 2021 at 06:02:26PM -0400, Andrei Alexandrescu via Digitalmars-d wrote:
> On 2021-11-01 17:41, Walter Bright wrote:
[...]
> > 4. The way scope & return & ref apply to types is completely
> > consistent.  This enables me to advise that when people have
> > problems understanding it, to rewrite their example code in terms of
> > raw pointers, as it will behave the same.
> 
> I very much wish this is true and useful.

Sometimes I feel like Walter has a private copy of dmd that behaves
differently from the one the rest of us use. `ref`, for example, due to
its special treatment as a storage qualifier instead of a type
constructor, is asymmetric w.r.t. other type ctors and therefore a
source of endless special cases in generic code.  It's just a royal pain
to work with.

And don't get us started on `auto ref`...


T

-- 
The best compiler is between your ears. -- Michael Abrash


More information about the Digitalmars-d mailing list