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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 7 18:47:18 PST 2009


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


Stewart Gordon <smjg at iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg at iname.com


--- Comment #5 from Stewart Gordon <smjg at iname.com> 2009-11-07 18:47:17 PST ---
(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.

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