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

[perl #67100] [PATCH] Move infix:<leg> to the setting

0 views
Skip to first unread message

Matthew Walton

unread,
Jul 1, 2009, 2:35:04 AM7/1/09
to bugs-bi...@netlabs.develooper.com
# New Ticket Created by Matthew Walton
# Please include the string: [perl #67100]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=67100 >


This patch moves operator infix:<leg> to the setting. S03 says it's
defined in terms of cmp, so that's what this does. The old PIR
implementation was slightly more complex, and I'm not sure why, but
this doesn't seem to need it to pass its spectests.

0001-Move-infix-leg-to-the-setting.patch

Patrick R. Michaud

unread,
Jul 1, 2009, 9:32:41 AM7/1/09
to Moritz Lenz via RT
On Wed, Jul 01, 2009 at 02:13:03AM -0700, Moritz Lenz via RT wrote:

> On Tue Jun 30 23:35:04 2009, matt-w wrote:
> > This patch moves operator infix:<leg> to the setting. S03 says it's
> > defined in terms of cmp, so that's what this does. The old PIR
> > implementation was slightly more complex, and I'm not sure why, but
> > this doesn't seem to need it to pass its spectests.
>
> I'm a bit puzzled by the current design, which this patch still
> preserves: leg is a more primitive operator than cmp, so I'd expect leg
> to be implemented in terms of even more primitive operators (either PIR
> level, of lt, eq, gt), and then cmp to be defined in terms of leg and
> <=>, depending on the type.
>
> Maybe pmichaud has some comments on this?

I don't have any strong comments on it -- from a design perspective
I can go either way. I suspect there's a reason that the present
design is factored the way it is... but I don't know the reason offhand.
Perhaps we need to ask perl6-language.

More generally, the infix:<cmp> operation itself is a little suspect;
I have an outstanding request for clarification [1] that I've been
told is being worked on, but I haven't heard any official word back yet.

[1] http://groups.google.com/group/perl.perl6.language/msg/c2f534edb0ab6c42

Since the proposed patch matches the current spec, I'm inclined to
accept it, at least until we have some more clarification in the spec
or from perl6-language.

Pm

0 new messages