proposed @noreturn attribute

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Mon Jul 17 15:42:02 PDT 2017


On 7/17/17 2:54 PM, H. S. Teoh via Digitalmars-d wrote:
> I see `typeof(assert(0))` as the same kind of over-engineering of
> something trivially solved and relatively unimportant ("rarely used")
> that has unfortunately plagued C++ design and led C++ to become the mess
> it is today.  It's sad to see D start down the same path...

There is no reason to over-react seeing as the option of adding a name 
is easy and always available; removing it not so much. This makes taking 
options in language design highly asymmetrical. Having the type 
available as an actual expression brings good options on the table 
because people can return those on unreachable paths etc. -- Andrei


More information about the Digitalmars-d mailing list