Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-19 Thread Joshua Isom
On Apr 18, 2007, at 3:48 PM, chromatic wrote: On Wednesday 18 April 2007 13:34, Alek Storm wrote: Vtable methods defined in C are visible from C. Of course, otherwise nothing would be able to call them. Therefore, it makes sense that vtable methods defined in PIR are visible from PIR, at

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-18 Thread Allison Randal
Alek Storm wrote: In the future, please keep in mind that I don't comment on anything unless I understand it. You've tried to explain things to me in several tickets that I already fully understand. I am especially surprised you would try to explain the current implementation of vtable over

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-18 Thread Alek Storm
On 4/18/07, Allison Randal <[EMAIL PROTECTED]> wrote: Yes, that's how they're implemented now. Currently, in order to use the common feature of overriding the vtable entry without polluting the namespace you have to specify ":vtable :method :anon". Which is huge progress over what we had before

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-18 Thread Allison Randal
Alek Storm wrote: I understand entirely how both features work. I should, as I implemented large sections of the code dealing with vtable overriding. Perhaps you should check the code, because they are *not* stored separately from each other. In the current revision, :vtable and :method u

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-18 Thread Alek Storm
On 4/18/07, Allison Randal <[EMAIL PROTECTED]> wrote: Alek Storm wrote: >> > >> > So, that still means :method can mean two different things, depending >> > on whether :vtable is present or not. That's still bad. >> >> How so? Without :vtable, :method adds a method to the class. With >> :vtable

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-18 Thread Alek Storm
On 4/18/07, chromatic <[EMAIL PROTECTED]> wrote: On Wednesday 18 April 2007 15:59, Alek Storm wrote: > Without :vtable, :method adds a method to the class. With :vtable, > :method doesn't add a method to the class - it makes the sub visible. > Two completely different things. I'd like to see s

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-18 Thread Allison Randal
Alek Storm wrote: > > So, that still means :method can mean two different things, depending > on whether :vtable is present or not. That's still bad. How so? Without :vtable, :method adds a method to the class. With :vtable, :method adds a method to the class. Without :vtable, :method adds a

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-18 Thread chromatic
On Wednesday 18 April 2007 15:59, Alek Storm wrote: > Without :vtable, :method adds a method to the class.  With :vtable, > :method doesn't add a method to the class - it makes the sub visible. > Two completely different things. I'd like to see some example code; this does not match my experience

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-18 Thread Alek Storm
On 4/18/07, Allison Randal <[EMAIL PROTECTED]> wrote: Alek Storm wrote: > >> Again, the only part of :method that :vtable needs to imply is the >> part that >> sets the invocant in the proper register and makes 'self' available >> within >> the body of the method. > > So, that still means :method

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-18 Thread Alek Storm
On 4/18/07, Allison Randal <[EMAIL PROTECTED]> wrote: Alek Storm wrote: > .sub get_string :vtable :method :anon # now we're in trouble Just like ":method :anon", but also stores it as a vtable entry. But herein lies the problem. Saying ":vtable :method :anon" is just like ":method :anon" does

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-18 Thread Allison Randal
Alek Storm wrote: Again, the only part of :method that :vtable needs to imply is the part that sets the invocant in the proper register and makes 'self' available within the body of the method. So, that still means :method can mean two different things, depending on whether :vtable is prese

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-18 Thread Allison Randal
Alek Storm wrote: This seems perfectly fine to me. The only change I think should be made is that :vtable automatically sets :method to true. Using :anon to exclude it from the namespace is what you originally proposed, so I'm curious why you've changed your mind. Because I realized that und

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-18 Thread Alek Storm
On 4/18/07, chromatic <[EMAIL PROTECTED]> wrote: On Wednesday 18 April 2007 14:15, Alek Storm wrote: > > If that's true, then users have to *know* the implementation details of > > vtable methods. Is it in C code or is it in PIR code? > > I have no idea why you're saying this. Why does making

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-18 Thread chromatic
On Wednesday 18 April 2007 14:15, Alek Storm wrote: > > If that's true, then users have to *know* the implementation details of > > vtable methods.  Is it in C code or is it in PIR code? > > I have no idea why you're saying this.  Why does making vtable methods > visible expose their implementatio

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-18 Thread Alek Storm
Okay, I think we completely misunderstood each other. Honestly, most of what I said was a reply to Allison's proposal. On 4/18/07, chromatic <[EMAIL PROTECTED]> wrote: On Wednesday 18 April 2007 13:34, Alek Storm wrote: > Vtable methods defined in C are visible from C. Of course, otherwise n

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-18 Thread chromatic
On Wednesday 18 April 2007 13:34, Alek Storm wrote: > Vtable methods defined in C are visible from C. Of course, otherwise nothing would be able to call them. > Therefore, it makes > sense that vtable methods defined in PIR are visible from PIR, at > least by default. That makes no sense to me

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-18 Thread Alek Storm
On 4/18/07, chromatic <[EMAIL PROTECTED]> wrote: > Making :method mean one thing when used with :vtable, and something > completely different without, seems like a really bad idea to me, and > is confusing to the user. The user will also be confused because > adding :vtable removes it from the n

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-18 Thread chromatic
On Wednesday 18 April 2007 08:04, Alek Storm wrote: > Making :method mean one thing when used with :vtable, and something > completely different without, seems like a really bad idea to me, and > is confusing to the user.  The user will also be confused because > adding :vtable removes it from the

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-18 Thread Alek Storm
On 4/16/07, Allison Randal <[EMAIL PROTECTED]> wrote: Here's the original post where I gave the rationale for making the flags work as they do: From the link: < This is the main thing Chip and I

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-15 Thread Allison Randal
Here's the original post where I gave the rationale for making the flags work as they do: I'm comfortable with a modification saying that :vtable always gets the 'self' parameter like :method does

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-14 Thread Alek Storm
On 4/11/07, chromatic <[EMAIL PROTECTED]> wrote: Allison's right about method visibility outside of the vtable, and throwing :anon on there seems a little hacky. Is this a behavior problem or a syntax problem? IIUC, putting :anon on a sub makes it inaccessible only through the namespace - th

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-11 Thread chromatic
On Wednesday 11 April 2007 05:40, Alek Storm wrote: > On 4/11/07, Allison Randal <[EMAIL PROTECTED]> wrote: > > Actually, setting :vtable without setting :method makes a great deal of > > sense, if you want to override a low-level vtable operation without > > adding a named method to the class.

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-11 Thread Alek Storm
On 4/11/07, Allison Randal <[EMAIL PROTECTED]> wrote: Actually, setting :vtable without setting :method makes a great deal of sense, if you want to override a low-level vtable operation without adding a named method to the class. Allison Just use the :anon flag. It was designed for this. Vt

Re: [perl #42430] [PATCH] make :vtable imply :method

2007-04-11 Thread Allison Randal
Alek Storm (via RT) wrote: This patch makes the :vtable sub pragma imply the :method pragma, which seems like common sense to me, since using :vtable without :method doesn't make much sense, and vtable overrides are called as methods from C anyway. Using :vtable and :method explicitly still wor

[perl #42430] [PATCH] make :vtable imply :method

2007-04-11 Thread Alek Storm
# New Ticket Created by "Alek Storm" # Please include the string: [perl #42430] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=42430 > This patch makes the :vtable sub pragma imply the :method pragma, which seems like commo