Ken Fox wrote:
> 
> Tom Hughes wrote:
> > In message <[EMAIL PROTECTED]>
> >           Chaim Frenkel <[EMAIL PROTECTED]> wrote:
> >
> > > I'd like to be able to mimic what the rules for nulls are in databases.
> >
> > >       NULL == NULL : false
> >
> > Always true surely?
> 
> NULL to a database means unknown not undefined or unitialized. Perhaps
> the internals could have both unknown and undefined types? We'll have to
> figure out the system for doing polymorphic stuff like + on two
> different types. Is this a vtable operation? If so, which vtable does
> the work? The first ala self and smalltalk? If it isn't a vtable
> operation then do we have to follow special protocols to talk to the
> adder?

I'd rather have this worked somewhat more like the C++ approach - see
which type is 'bigger' and promote the other one.

I want the expressions '1 + 3.14' and '3.14 + 1' to work the same, and
they do.  Using the current perl overloading mechanism, '1 +
Math::BigInt' and 'Math::BigInt + 1' also mean the same (though the hack
used for this, parameter reversing, is a bit gross).  Right now,
'Math::BigInt + Foo' and 'Foo + Math::BigInt' only mean the same if
either only one class implements operator overloading, or both classes
are aware of one another.  I'd like this to be a bit safer and
predictable in perl6.

Hildo

Reply via email to