study: use checkedint as a drop-in replacement of native long

H. S. Teoh hsteoh at
Tue Aug 18 05:07:50 UTC 2020

On Mon, Aug 17, 2020 at 09:23:01PM -0400, Andrei Alexandrescu via Digitalmars-d wrote:
> Whenever I implement opAssign I have it return void and try to
> remember to propose that the compiler takes care of chained
> assignments by itself.
> Requiring user-defined assignment to `return *this;` was goofy in C++.
> Requiring user-defined assignment to `return this;` is goofy in D.
> Assignment should return void and the compiler should take care of it.

+1.  Is there an enhancement request for this?  As Walter often says, if
it's not in bugzilla, it doesn't exist. ;-)


If Java had true garbage collection, most programs would delete themselves upon execution. -- Robert Sewell

More information about the Digitalmars-d mailing list