Pure, Nothrow in Generic Programming
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Mon Nov 30 07:18:17 PST 2009
Rainer Deyke wrote:
> 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.
I only know of writing to cause actual device writing, so I'd be
interested in a link that shows otherwise.
Anyhow, this is a pretty good argument; reading some memory-mapped cache
could cause other pages to be written etc.
Andrei
More information about the Digitalmars-d
mailing list