More on semantics of opPow: return type

Lionello Lunesu lio at lunesu.remove.com
Mon Dec 7 17:33:06 PST 2009


On 8-12-2009 1:43, Andrei Alexandrescu wrote:
> Nice analysis. IMHO this should lead us to reconsider the necessity of
> "^^" in the first place. It seems to be adding too little real value
> compared to the complexity of defining it.

No, Don's just being awefully thorough. If you'd revisit all existing
operators with the same thoroughness you would probably give up the
whole idea of writing a language. Apart from the int/int division
there's the int<<int, "What if I shift more than 31?" "What if I shift
with <0?" and of course int+int "What to do on overflow?" etc..

I think ^^ can be made to work just fine. Let's not get carried away
trying to make it perfect.

L.



More information about the Digitalmars-d mailing list