Re: Tip: assign a value to a hash using a variable as a key

2017-10-01 Thread ToddAndMargo
On 10/01/2017 09:17 AM, Brandon Allbery wrote:      (b d) What does the ".succ" do? In this case it's just an example of an expression that wouldn't have worked by normal interpolation (although $v.succ() would have, as I described earlier). succ is short for "successor"; thin

Re: Tip: assign a value to a hash using a variable as a key

2017-10-01 Thread Brandon Allbery
On Sun, Oct 1, 2017 at 4:01 AM, ToddAndMargo wrote: > On 09/30/2017 07:59 PM, Brandon Allbery wrote: > >> Inside " " strings, variables like $foo and (simple) expressions >> (described above) will be replaced by their values; and you can use { } to >> insert the result of any expression. (This al

Re: Tip: assign a value to a hash using a variable as a key

2017-10-01 Thread Brandon Allbery
On Sun, Oct 1, 2017 at 4:01 AM, ToddAndMargo wrote: > On 09/30/2017 07:59 PM, Brandon Allbery wrote: > >> parenthesized expression (so, "hi $foo.name " will not >> work (it'll expand '$foo' instead of '$foo.name ') but >> "hi $foo.name ()" will,

Re: Tip: assign a value to a hash using a variable as a key

2017-10-01 Thread Brandon Allbery
On Sun, Oct 1, 2017 at 4:32 AM, Richard Hainsworth wrote: > > >> Is English your first Language? I asked this because of your use >>> >> of the word "interpolate", which you used correctly. >> > This is an odd question and comes across as prejudiced. If someone uses a > word correctly, then how

Re: Tip: assign a value to a hash using a variable as a key

2017-10-01 Thread ToddAndMargo
On 10/01/2017 01:32 AM, Richard Hainsworth wrote: Remember also that Larry Wall - perl's "inventor" - is a linguist, and the use of language in perl6 space in particular reflects that. Hi Richard, Hmm. That does explain its ease of use over other languages. I really liked Perl 5, althoug

Re: Tip: assign a value to a hash using a variable as a key

2017-10-01 Thread Richard Hainsworth
    4) "interpolating" as it refers to Perl (not math, where you "guess"     what a value is based on values on both sides of you). Replacing something inside a string with the string representation of its value. This sense is also used in documentation for the shell, where you can also

Re: Tip: assign a value to a hash using a variable as a key

2017-10-01 Thread ToddAndMargo
On 09/30/2017 07:59 PM, Brandon Allbery wrote: On Sat, Sep 30, 2017 at 10:30 PM, ToddAndMargo > wrote: On 09/30/2017 02:15 PM, Brandon Allbery wrote: Basically: < > is single quotes and treats variables and expressions as literals. << >> is doub

Re: Tip: assign a value to a hash using a variable as a key

2017-09-30 Thread Brandon Allbery
On Sat, Sep 30, 2017 at 10:30 PM, ToddAndMargo wrote: > On 09/30/2017 02:15 PM, Brandon Allbery wrote: > >> Basically: < > is single quotes and treats variables and expressions as >> literals. << >> is double quotes and interpolates variables but not general >> expressions. And { } does no quotin

Re: Tip: assign a value to a hash using a variable as a key

2017-09-30 Thread ToddAndMargo
On 09/30/2017 02:15 PM, Brandon Allbery wrote: Basically: < > is single quotes and treats variables and expressions as literals. << >> is double quotes and interpolates variables but not general expressions. And { } does no quoting at all and uses general expressions. Hi Brandon, I am writin

Re: Tip: assign a value to a hash using a variable as a key

2017-09-30 Thread Brandon Allbery
On Sat, Sep 30, 2017 at 7:44 PM, ToddAndMargo wrote: > On 09/30/2017 02:15 PM, Brandon Allbery wrote: > >> This concept gets reused enough that it's not separately described for >> every place where it is used; the documentation would be impossible to >> manage, almost as impossible to read, and

Re: Tip: assign a value to a hash using a variable as a key

2017-09-30 Thread ToddAndMargo
On 09/30/2017 02:15 PM, Brandon Allbery wrote: This concept gets reused enough that it's not separately described for every place where it is used; the documentation would be impossible to manage, almost as impossible to read, and often out of sync with itself if every reused concept had to be

Re: Tip: assign a value to a hash using a variable as a key

2017-09-30 Thread ToddAndMargo
On 09/30/2017 02:15 PM, Brandon Allbery wrote: Basically: < > is single quotes and treats variables and expressions as literals. << >> is double quotes and interpolates variables but not general expressions. And { } does no quoting at all and uses general expressions. Thank you!

Re: Tip: assign a value to a hash using a variable as a key

2017-09-30 Thread Brandon Allbery
On Sat, Sep 30, 2017 at 5:08 PM, ToddAndMargo wrote: > On 09/30/2017 02:20 AM, Timo Paulssen wrote: > >> This doc page should help you a lot with this topic: >> >> https://docs.perl6.org/language/subscripts#Basics >> >> > A little bit. I had found that when I was researching. It did not > go in

Re: Tip: assign a value to a hash using a variable as a key

2017-09-30 Thread ToddAndMargo
On 09/30/2017 02:20 AM, Timo Paulssen wrote: This doc page should help you a lot with this topic: https://docs.perl6.org/language/subscripts#Basics A little bit. I had found that when I was researching. It did not go into who to use a variable as a key value. This is what I wrote myself:

Re: Tip: assign a value to a hash using a variable as a key

2017-09-30 Thread Timo Paulssen
This doc page should help you a lot with this topic: https://docs.perl6.org/language/subscripts#Basics