exceptions vs error codes

Ola Fosheim Grøstad via Digitalmars-d digitalmars-d at puremagic.com
Wed Jul 13 03:14:24 PDT 2016


On Wednesday, 13 July 2016 at 09:53:31 UTC, ketmar wrote:
> On Wednesday, 13 July 2016 at 09:12:56 UTC, Ola Fosheim Grøstad 
> wrote:
>> Undefined by the language is not the same as unknown in a 
>> concrete instance. It simply means that such constructs are 
>> not part of the specified language.
>
> "program is in undefined state"? that is what written in the 
> specs.

That is a meaningless statement. The program is never in a state. 
The program is the input, the source code.

> and it means exactly that: *anything* can be messed up, 
> including druntime internal things. the only thing one can 
> really do here is invoke "exit" syscall as fast, as possible, 
> or dereference zero pointer to get core dump.

That's an implementation detail.



More information about the Digitalmars-d mailing list