[Issue 2730] Restriction on op= can be lifted
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 20 18:10:29 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2730
smjg at iname.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |smjg at iname.com
------- Comment #1 from smjg at iname.com 2009-03-20 20:10 -------
opIndexAssign will always be needed for something. Library implementations of
AAs and bit arrays are an example.
There should be probably be a choice of defining opIndexAssign or defining
opIndex with a ref return. opIndexAssign could even work for the example code,
if s[i] += 4 were rewritten as s[i] = s[i] + 4 (with i being evaluated only
once) and then expanded into op functions.
The tricky bit is deciding on the logic to use if both are defined....
--
More information about the Digitalmars-d-bugs
mailing list