Talk:Parrot Virtual Machine/Not Quite Perl

You have:

%myhash{'mykey'} = 7 %mathconstants{'pi'} = 3.1415; %mathconstants{'2pi'} = 2 * %mathconstants{'pi'};

Should those be := instead? I'm not entirely clear on the diff in P6 between = and := (more like a ref assignment, right?) but if this is NQP, it should be :=, right? Hmm, you have also:

@myarray[1] := 5; @b := (@a[3], @a[2], @a[1);

which is an illegal list usage in NQP but not p6 maybe - just clear up the p6/NQP context of these examples? Afbach (talk) 02:39, 23 June 2008 (UTC)

'nother nit:

1. We've received a "Hello" or a "Goodbye", and the system will print a success method. 2. We've received a different word, and we will receive an error message. 3. We've received too many words, not enough words, or something that isn't a word. This will cause a parse error. Try it!

Maybe #2 as:

2. We've received a different word, and we will receive the "failure, we found ..." message.

As for "try it" - sure wish there were an easy way to do so ... ;-> Afbach (talk) 02:55, 23 June 2008 (UTC)


 * Thanks for the input, you're right that I've made a few mistakes when entering in some of the code. The  is an assignment, where the   is called a "bind". I'm not exactly clear on the difference myself, but NQP does not currently allow the former. You're also right that NQP does not currently have a "list context", so the example you cited is likely me switching into P6 mode, and not in NQP mode like I should be.  I'll work on these things, thanks! --Whiteknight (Page) (Talk) 18:40, 23 June 2008 (UTC)