Re: PIR syntax methods ambiguity

2007-05-09 Thread Klaas-Jan Stol
On 5/9/07, Allison Randal <[EMAIL PROTECTED]> wrote: Patrick R. Michaud wrote: > > Personally, I would think that the standard approach for going from > a String PMC to a method invocation would be via the find_method > opcode. But that's just me. That goes back to the philosophical question o

Re: PIR syntax methods ambiguity

2007-05-09 Thread Klaas-Jan Stol
On 5/9/07, Allison Randal <[EMAIL PROTECTED]> wrote: Klaas-Jan Stol wrote: > hi, > IIRC (currently no pc around to check, but I realized this issue when > reading on objects pdd), calling a method in PIR can be done as follows: > > $P0.'someMethod'() > > but also: > > .local string meth /* or m

Re: PIR syntax methods ambiguity

2007-05-08 Thread chromatic
On Tuesday 08 May 2007 13:38:42 Patrick R. Michaud wrote: > Correct, I was only referring to the case where a PMC is a > String holding a method name -- I've not really come across that > as being a common case in the programming that I do. It's likely more important in languages where method nam

Re: PIR syntax methods ambiguity

2007-05-08 Thread Patrick R. Michaud
On Tue, May 08, 2007 at 10:50:14AM -0700, Allison Randal wrote: > We could entirely disallow barenames, so it's always either a quoted > string or a variable. > > But even that doesn't solve the problem, because currently if the method > name is a string PMC: > > $P0 = new String > $P0 = "h

Re: PIR syntax methods ambiguity

2007-05-08 Thread Allison Randal
Patrick R. Michaud wrote: Personally, I would think that the standard approach for going from a String PMC to a method invocation would be via the find_method opcode. But that's just me. That goes back to the philosophical question of "Is PIR a language to be generated by compilers, or is it

Re: PIR syntax methods ambiguity

2007-05-08 Thread Allison Randal
Klaas-Jan Stol wrote: hi, IIRC (currently no pc around to check, but I realized this issue when reading on objects pdd), calling a method in PIR can be done as follows: $P0.'someMethod'() but also: .local string meth /* or maybe a pmc ?*/ meth = 'someMethod' $P0.meth() This is a long-standi

Re: PIR syntax methods ambiguity

2007-05-08 Thread Allison Randal
Patrick R. Michaud wrote: Well, since I've only come across a single case where the method I needed to call was in a String PMC, I've never found it annoying. But again, perhaps that's just me and it really is a big annoyance to other PIR programmers. :-) Oh, I was talking about a complete s

Re: PIR syntax methods ambiguity

2007-05-08 Thread Patrick R. Michaud
On Tue, May 08, 2007 at 12:38:43PM -0700, Allison Randal wrote: > Patrick R. Michaud wrote: > > > >Well, since I've only come across a single case where the > >method I needed to call was in a String PMC, I've never found > >it annoying. But again, perhaps that's just me and it really is > >a big

Re: PIR syntax methods ambiguity

2007-05-08 Thread chromatic
On Tuesday 08 May 2007 12:15:51 Allison Randal wrote: > Perhaps PIR's next stage of evolution is to split off into two > languages, one for generation and one for humans. William of Ockham told me to ask "What features of the PIR language suitable for humans to write make it difficult for code t

Re: PIR syntax methods ambiguity

2007-05-08 Thread Patrick R. Michaud
On Tue, May 08, 2007 at 12:15:51PM -0700, Allison Randal wrote: > Patrick R. Michaud wrote: > > > >Personally, I would think that the standard approach for going from > >a String PMC to a method invocation would be via the find_method > >opcode. But that's just me. > > That goes back to the philo

PIR syntax methods ambiguity

2007-05-03 Thread Klaas-Jan Stol
hi, IIRC (currently no pc around to check, but I realized this issue when reading on objects pdd), calling a method in PIR can be done as follows: $P0.'someMethod'() but also: .local string meth /* or maybe a pmc ?*/ meth = 'someMethod' $P0.meth() However, this looks like as if the object in