[Issue 3481] PATCH: opPow(), x ^^ y as a power operator

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 7 22:26:45 PST 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3481



--- Comment #6 from Don <clugdbug at yahoo.com.au> 2009-11-07 22:26:45 PST ---
(In reply to comment #5)
> (In reply to comment #1)
> > I've been wanting an exponentiation operator since the Stone Age, but it seemed
> > like too small an issue to really make a point about.  This is terrific. 
> > However, can we at least consider making ^ the exponentiation op and moving xor
> > to ^^?  Yes, it breaks C compatibility, but who the heck really uses bitwise
> > xor except in really low-level code anyhow?
> 
> Are we going to change around the other bitwise vs. logical operators as well?
> 
> Confusion with the bitwise operators is why I'm against the choice of ^ or ^^
> for exponentiation.  Sooner or later, someone's going to expect ^^ to be the
> logical xor operator.

Logical xor is already in the language, its symbol is !=.

> But I don't know what would be a good symbol for it.  I'm not sure I've ever
> really liked **, aside from the current meanings of those two characters in
> sequence.  Maybe if only ↑ had remained on keyboards beyond ZX Spectrum
> days....

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list