opStar
Janice Caron
caron800 at googlemail.com
Sat Nov 10 09:18:37 PST 2007
On 11/10/07, Janice Caron <caron800 at googlemail.com> wrote:
> On 11/10/07, Michel Fortin <michel.fortin at michelf.com> wrote:
> > And then opStarAddAssign, opStarDivAssign, opStarShlAssign,
> > opStarCatAssign... no, that doesn't sound right.
>
> Well you also can't do
> a[0] += n;
> a[0] /= n;
> a[0] <<= n;
> a[0] ~= n;
>
> for classes overloading opIndex() and opIndexAssign().
You're right. It's a different beast. You'd /want/ to be able to do
*p++ = *q++;
Though of course you can already do:
a[i++] = b[j++];
I always thought smart arrays were "the D way", but now I'm just confused.
More information about the Digitalmars-d
mailing list