[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: inherted overload & mixed type operations
On Wed, Jan 12, 2000 at 02:40:24AM +0100, Marc Lehmann wrote:
> > > But to be more helpful: C++ (for example) lets you overload based on both
> > > types.
> > Only if *you* know all the types in advance
>
> Please explain: I (and nobody else, either) need not know *anything*
> about the type I overload. Of course, the _semantics_ to apply for types
> I have no knowledge about is rather limited, but that's exactly the same
> situation as in perl....
>
> The difference is that I can _still_ overload based on both specific
> types, when I need it, so it really seems to me that C++ overloading is a
> superset of the simple-minded (but still effective) perl model.
I have no idea what are you talking about. Please explain how you can
do this in C++:
a) Jack writes a class Math::BigInt not knowing what Jane does;
b) Jane writes a class Math::PDL not knowing what Jack does;
c) Joe uses these classes, and writes
bigint_data + pdl_data;
> The problem is that there is no documented way to overwrite or enhance
> overloaded methods from other modules. So the only way would be to
> actually _modify_ the source of the PDL module.
Again: please stop these pointless accusations.
Ilya
- Follow-Ups from:
-
Marc Lehmann <marc@gimp.org>
- References to:
-
Marc Lehmann <marc@gimp.org>
Ilya Zakharevich <ilya@math.ohio-state.edu>
Marc Lehmann <marc@gimp.org>
Ilya Zakharevich <ilya@math.ohio-state.edu>
Marc Lehmann <marc@gimp.org>
Ilya Zakharevich <ilya@math.ohio-state.edu>
Marc Lehmann <marc@gimp.org>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]