Front page | perl.perl6.internals |
Postings from March 2002
Re: Multimethod dispatch for parrot?
Thread Previous
|
Thread Next
From:
Dan Sugalski
Date:
March 7, 2002 10:49
Subject:
Re: Multimethod dispatch for parrot?
Message ID:
a0510150bb8ad4cc8b930@[63.120.19.221]
At 11:51 AM -0500 3/7/02, Michel J Lambert wrote:
>I was curious if anyone has ever considered implementing multimethod
>dispatch (MMD) directly into parrot.
Yes. We will, for actual method and sub dispatch. Not for the other
vtable methods, though.
>In my opinion, this would provide
>several benefits over the current system. While (IMHO) MMD provides many
>benefits over the current system in terms of extensibility and ease of
>maintainence, it is still a superset of single-dispatch systems, and could
>easily be made to support non-MMD languages like Python, Perl6, etc.
Don't assume perl 6 won't me MMD. It likely will. (I'd actually be
really surprised if it wasn't, but we haven't gotten there yet)
>Parrot has been doing some questionable things, in my mind, to get around
>the lack of multimethod dispatch.
It's not a lack, really. It's a deliberate design decision, and one
made specifically for speed reasons. It saves an extra, relatively
expensive, comparison for most of the operations.
The core vtable methods need to be as fast as we can possibly make
them--we don't want to drop speed if we can possibly help it.
>First, there are basic native types such
>as num, int, and string, which I'm perfectly fine with. But what bothers
>me is the fact that bigint's and bignum's are being given a special place
>in the vtable.
Why? They're base types, really. I'd like to add in support for
complex numbers too, but I've not yet gone that far. Might next week,
you never know.
> If we can't get these classes working with the base types
>properly without putting them in the core and vtable itself, how can we
>expect users to make such things as complex numbers and matrices mesh with
>the system?
Complex numbers are an issue. Matrices aren't--they're a form of
aggregate, and they get handled elsewhere.
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
dan@sidhe.org have teddy bears and even
teddy bears get drunk
Thread Previous
|
Thread Next