Pure, Nothrow in Generic Programming

Rainer Deyke rainerd at eldwood.com
Fri Nov 27 19:29:03 PST 2009


Andrei Alexandrescu wrote:
> Denis Koroskin wrote:
>> Points 2 and 3 introduce undefined behavior, which is not allowed in
>> SafeD :p
> 
> s/undefined/implementation-defined/

Behavior is only implementation-defined if the implementation actually
defines it.  When targeting a specific implementation of a language,
there is no difference between implementation-defined behavior and just
plain defined behavior.

I think the term you are looking for is "non-deterministic", which
describes an operation which is defined to have one of several possible
effects, but which of these effects actually takes place is not defined.

Incidentally, it is sometimes possible to send output to a physical
device by merely reading from a memory-mapped I/O address.  Therefore
the set of possible results of memcmp includes sending garbage output to
a physical device.


-- 
Rainer Deyke - rainerd at eldwood.com



More information about the Digitalmars-d mailing list