New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement interpolation of @things.with.postcircumfix.<at>[the]('end') in interpolating strings #610
Comments
From @clintongormleymy @a = < 1 2 3 >;
Broken in version 29834 clint |
From @moritzOn Fri Aug 22 07:04:59 2008, DrTech wrote:
I added failing TODO tests for that (and hash interpolation) to (Array interpolation was implemented in r15926 btw) |
The RT System itself - Status changed from 'new' to 'open' |
From @pmichaudOn Fri, Aug 22, 2008 at 07:05:00AM -0700, Clinton Gormley wrote:
Correct, rakudo doesn't yet know how to interpolate arrays However, curly interpolation *does* currently work, so one can do > my @a = < 1 2 3 >; say "@a = {@a}"; Pm |
From @masak$ ./perl6 -e 'my $a = "oh hai"; say "{$a.uc} -- KTHXBAI"' # works $ ./perl6 -e 'my $a = "oh hai"; say "$a.uc() -- KTHXBAI"' # should |
From @pmichaudOn Sun Nov 30 08:23:28 2008, masak wrote:
This one is just a bit tricky, because the quote parser has to know how In the meantime, I recommend using the curlies. Pm |
The RT System itself - Status changed from 'new' to 'open' |
@pmichaud - Status changed from 'open' to 'stalled' |
From @finanalystArray element does not interpolate it does in perl5 $ perl6
$ zoid Array element interpolation is not listed as something common not |
From @particleOn Fri, Jan 9, 2009 at 02:31, via RT Richard Hainsworth
this is a design choice. in order to interpolate this, use a closure ~jerry |
The RT System itself - Status changed from 'new' to 'open' |
From @particleOn Fri, Jan 9, 2009 at 08:26, Jonathan Scott Duff <perlpilot@gmail.com> wrote:
ah! thank you for correcting me, i misremembered. "@x" won't ~jerry |
From @masakjerry (>), Richard (>>):
...Meaning that it has dependencies to other components in Rakudo // Carl |
From @perlpilotOn Fri, Jan 9, 2009 at 9:49 AM, jerry gay <jerry.gay@gmail.com> wrote:
Er ... that may be a temporary rakudo design choice, but S02 says: Bare scalar variables always interpolate in double-quotish strings. Bare array, hash, and subroutine variables may I<never> be start an interpolation if it is followed by a sequence of one or more bracketed dereferencers: that is, any of: =over 4 =item 1. An array subscript =item 2. A hash subscript =item 3. A set of parentheses indicating a function call =item 4. Any of 1 through 3 in their B<dot> form =item 5. A method call that includes argument parentheses =item 6. A sequence of one or more unparenthesized method call, =back In other words, this is legal: "Val = $a.ord.fmt('%x')\n" and is equivalent to "Val = { $a.ord.fmt('%x') }\n" So, it would seem that my @x = 1, 2, 3; say "2nd is @x[1]"; # 2nd is 2 is perfectly valid perl 6. -Scott |
From markus@mnslaker.f9.co.ukScalar variables interpolate, but array and hash elements don't: msl@edward:~$ perl6 -e 'my $a = 1; say "$a"' Copyright 2006-2008, The Perl Foundation. msl@edward:~$ |
From @masakMarkus Laker (>):
This is an oft-reported TODO, but one that's stalling on other future $ perl6 -e 'my @a = 1; say "{@a[0]}"' $ perl6 -e 'my %h = one => 1; say "{%h<one>}"' HTH, |
From peter@schwenn.comShouldn't C:\parrot>perl6 -e "my @items; @items=( 1,2,3,4); say qq(move @items[] to move @items[] to you have produced If not, how WOULD one provide an interpolating quote context inside of a ps. this is parrot and rakudo as of Feb 22 morning, (but rakudo has behaved |
From @masakOn Sun Feb 22 11:46:09 2009, schwenn wrote:
Yes. This is a long-standing TODO in Rakudo, awaiting some quoting
$ perl6 -e 'my @items = 1..4; say qq(move {@items} to you)' |
The RT System itself - Status changed from 'new' to 'open' |
From @jnthnOn Fri Aug 22 15:34:38 2008, pmichaud wrote:
We're now using the more STD.pm-like parsing, and this all works nicely. Thanks, Jonathan |
1 similar comment
From @jnthnOn Fri Aug 22 15:34:38 2008, pmichaud wrote:
We're now using the more STD.pm-like parsing, and this all works nicely. Thanks, Jonathan |
@jnthn - Status changed from 'new' to 'open' |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#62198 (status was 'resolved')
Searchable as RT62198$
The text was updated successfully, but these errors were encountered: