proposed @noreturn attribute
w0rp via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jul 24 11:02:28 PDT 2017
I didn't look through all of the replies to this thread to check
that this hasn't been mentioned yet, but TypeScript uses the
'never' return type for functions that never return.
https://www.typescriptlang.org/docs/handbook/basic-types.html#never
The type isn't used for any optimisations, it's only used for
preventing you from adding lines of code after functions which
never return. (Say if they run "forever" or throw exceptions.)
I thought it would be worth mentioning how another language
handles this currently.
More information about the Digitalmars-d
mailing list