Undefined behaviours in D and C

Jesse Phillips jessekphillips+D at gmail.com
Thu Apr 15 07:24:07 PDT 2010


Part of the reason D leaves undefined behavior is because you are
breaking compiler guarantees. Such as:

    char[] s = ...;
    immutable(char)[] p = cast(immutable)s;     // undefined behavior

I think what would be more helpful is instead propose what undefined
behavior should be defined as and push that. Walter doesn't like
undefined behavior, so I'm sure either he doesn't know what it should
be defined as or has a good reason to leave it.Part of the reason D
leaves undefined behavior is because you are breaking compiler
guarentees.



More information about the Digitalmars-d mailing list