Re: RFC 222 (v1) Interpolation of method calls

2000-09-15 Thread David L. Nicol
Michael Fowler wrote: > Or maybe we need a more generic solution (as someone else suggested, I > forget who). Something that allows the arbitrary execution of code, much > like @{[ ]}, but cleaner. Unfortunately, I can't think of anything > suitable. > > Whatever direction this discussion take

Re: RFC 222 (v1) Interpolation of method calls

2000-09-15 Thread Bart Lateur
On Fri, 15 Sep 2000 01:36:50 -0800, Michael Fowler wrote: >Or maybe an alternative, using &: > >"foo &foo(arg, arg, arg) bar" >"foo &{ foo(arg, arg, arg) } bar" Ah, yes, &{...}, I kinda like that. Unfortunately, in regexes, /&{1,3}/ means matching 1 to three ampersands. There's a slight

Re: RFC 222 (v1) Interpolation of method calls

2000-09-15 Thread Michael Fowler
On Fri, Sep 15, 2000 at 10:58:26AM +0200, Bart Lateur wrote: > MJD has a "silly module" which can tie a hash to a function: > Interpolation.pm. I think I would like a special case, a specific hash > that is *always* tied to a function that returns the arguments. Make it, > for example, %$, %@ or %

Re: RFC 222 (v1) Interpolation of method calls

2000-09-15 Thread Michael G Schwern
On Thu, Sep 14, 2000 at 05:31:44PM -0500, David L. Nicol wrote: > A possibility that does not appear in RFC222.1 is to put tho whole > accessor expression inside curlies: > > print "Today's weather will be ${weather->temp} degrees and sunny."; > > which would follow the "You want something

Re: RFC 222 (v1) Interpolation of method calls

2000-09-15 Thread Bart Lateur
On Thu, 14 Sep 2000 18:37:22 -0500, David L. Nicol wrote: > print "Today's weather will be ${weather->temp} degrees and sunny."; > >which would follow the "You want something funny in your interpolated >scalar's name or reference, you put it in curlies" rule. I too feel that an approach li

Re: RFC 222 (v1) Interpolation of method calls

2000-09-14 Thread Michael Fowler
On Thu, Sep 14, 2000 at 06:37:22PM -0500, David L. Nicol wrote: > A possibility that does not appear in RFC222.1 is to put tho whole > accessor expression inside curlies: > > print "Today's weather will be ${weather->temp} degrees and sunny."; > > which would follow the "You want something

Re: RFC 222 (v1) Interpolation of method calls

2000-09-14 Thread David L. Nicol
> > Method calls should interpolate in double-quoted strings, and similar > locations. > > print "Today's weather will be $weather->temp degrees and sunny."; A possibility that does not appear in RFC222.1 is to put tho whole accessor expression inside curlies: print "Today's weath

Re: RFC 222 (v1) Interpolation of method calls

2000-09-14 Thread Dave Rolsky
First of all, I think this is a great idea On 14 Sep 2000, Perl6 RFC Librarian wrote: > Are there any contexts besides double quotes ("", qq{}, <<"EOF") where this > need be applied? What about inside regexes? And if so, left and/or right > hand side? Regexes are enough like double quoted str