Sergey Gromov wrote:
Tue, 25 Nov 2008 15:49:23 -0600, Andrei Alexandrescu wrote:

Sergey Gromov wrote:
2.  For those willing to port large C/C++ codebases introduce a compiler
compatibility switch which would add global operators mimicking the C
behavior:

uint opAdd(int, uint)
uint opAdd(uint, int)
ulong opAdd(long, ulong)
etc.
Having semantics depend so heavily and confusingly on a compiler switch is extremely dangerous. Note that actually quite a lot of code will compile, with different semantics, with or without the switch.

One of us should be missing something.  There was no 'different
semantics' in my proposal.  The code either compiles and behaves exactly
like in C or does not compile at all.  The amount of code which compiles
or fails depends on a compiler switch, not semantics.

Sorry, I misunderstood.

Andrei

Reply via email to