Vision for the D language - stabilizing complexity?

Chris Wright via Digitalmars-d digitalmars-d at puremagic.com
Wed Jul 13 06:52:06 PDT 2016


On Wed, 13 Jul 2016 10:25:55 +0000, sarn wrote:
> Implementation-defined stuff is something that's not specified, but can
> be presumed to do *something*.  Undefined stuff is something that's
> officially considered to not even make sense

This comes from the C++ spec. We're following the same definitions. To 
wit:

"""
The semantic descriptions in this International Standard define a 
parameterized nondeterministic abstract machine.

Certain aspects and operations of the abstract machine are described in 
this International Standard as implementation-defined (for example, sizeof
(int)). These constitute the parameters of the abstract machine. Each 
implementation shall include documentation describing its characteristics 
and behavior in these respects.

Certain other aspects and operations of the abstract machine are 
described in this International Standard as unspecified (for example, 
order of evaluation of arguments to a function). Where possible, this 
International Standard defines a set of allowable behaviors. These define 
the nondeterministic aspects of the abstract machine.

Certain other operations are described in this International Standard as 
undefined (for example, the effect of dereferencing the null pointer). 
[ Note: this International Standard imposes no requirements on the 
behavior of programs that contain undefined behavior. —end note ]
"""

Implementation-defined stuff *is* specified. It's specified in the 
documentation of each compiler.

Undefined stuff *can* make sense. I want to mutate a data structure 
marked immutable. It's obvious what I want to have happen, it's just not 
obvious what will actually happen.


More information about the Digitalmars-d mailing list