Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Namespace.get_namespace() vs. optional params

0 views
Skip to first unread message

Chip Salzenberg

unread,
Jul 17, 2006, 1:29:18 PM7/17/06
to Allison Randal, parrot-...@perl.org
Looking over the recent editorial improvements in pdd21, I need to point out
that, right now, if a method is written in C, it can't have optional
arguments. (This is per Leo; I haven't checked into how/why this
restriction arose.)

Thus, to support both of these interfaces:

=item get_namespace

$P1 = $P2.get_namespace($P3)
+ $P1 = $P2.get_namespace()

We'll have to either write the method in PIR (which isn't necessarily a
problem, though it will be a hair slower) or switch to MMD (I don't know yet
what that will do; for all I know it'll work perfectly the first time, but
it's just another thing to do as part of the conversion).

Mind you, I'm OK with this, but it's something to be aware of.
--
Chip Salzenberg <ch...@pobox.com>

Allison Randal

unread,
Jul 17, 2006, 5:01:08 PM7/17/06
to Chip Salzenberg, parrot-...@perl.org
Chip Salzenberg wrote:
> Looking over the recent editorial improvements in pdd21, I need to point out
> that, right now, if a method is written in C, it can't have optional
> arguments. (This is per Leo; I haven't checked into how/why this
> restriction arose.)

Aye. This went through my mind as I made the change, but I decided to
add it anyway. Thinking through the chain of dependencies, though, I've
removed it again.

Long-term, we need to minimize the differences between low-level PMCs
and Parrot objects defined in PIR code. That may mean allowing optional
arguments and named parameter passing. But, I want to keep the PDDs
focused on driving us toward a 1.0 release, and this isn't a necessary
feature.

Let the yaks go unshaved,
Allison

Chip Salzenberg

unread,
Jul 24, 2006, 4:48:34 PM7/24/06
to Allison Randal, parrot-...@perl.org
On Mon, Jul 17, 2006 at 02:01:08PM -0700, Allison Randal wrote:
> Long-term, we need to minimize the differences between low-level PMCs
> and Parrot objects defined in PIR code. That may mean allowing optional
> arguments and named parameter passing. But, I want to keep the PDDs
> focused on driving us toward a 1.0 release, and this isn't a necessary
> feature.

I've added a TODO ticket, in case somebody with spare tuits wanders by.

> Let the yaks go unshaved,
> Allison

It is not I who am crazy -- it is I who am _mad_!
--
Chip Salzenberg <ch...@pobox.com>

0 new messages