David Mitchell wrote:
>
> Well, many of the vtable methods are operator-ish rather than value-ish,
> presumably on the grounds of efficiency. A pure 'value' vtable wouldnt
> have add(), concatenate() etc. Whihc leads me back to: I'm not sure
> whether you are in favour of, or oppose, += etc being vtable methods.
>

Oppose. (Actually I'm talking about my idea on vtables, i.e. separate +/-/*
in one vtable and store/fetch in another). My proposal on ++ and -- would be
having the `value'-part of the vtable (the one that handles +/-/*) return a
value corresponding to what would be the value of it after an increment or
decrement. store would be used to actually commit the ++/-- operation. This
would serve both postfix and prefix cases, because in one case the value
before the store would be used, and in the other the one after.

(I just reminded the C++ overloading of ++, that uses a dummy parameter to
tell if it's a pre or a post increment. So bad...)

- Branden

Reply via email to