develooper Front page | perl.perl6.internals | Postings from September 2001

PMC vtable vs other overloading techniques

Thread Previous | Thread Next
From:
Ken Fox
Date:
September 10, 2001 16:47
Subject:
PMC vtable vs other overloading techniques
Message ID:
3B9D530C.7D84BCED@vulpes.com
Simon Cozens wrote:
> FWIW, it's just dawned on me that if we want all of these things to be
> overloadable by PMCs, they need to have vtable entries. The PMC vtable
> is going to be considerably bigger than we anticipated.

Surely you don't expect the PMC vtable to be the only mechanism
for overloading?!

Perl 6 has the option of:

* emiting Perl 6 specific opcodes
* over-riding built-in opcodes in a lexical scope
* generating method calls instead of ops
* replacing the dispatcher in a lexical scope

We've talked about all of those options. Have you eliminated some
of them?

One of the things that confuses me is how compiler writers will
decide to use one code generation technique over another. For example,
if the Perl back-end generates a method call for sin() and Python
generates a custom op, the two won't interoperate. IMHO this needs to
be nailed down soon or we'll end up with a messy architecture.

Just because Perl is TMTOWTDI doesn't mean Parrot should be.

- Ken

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About