xiaoyafeng has asked for the wisdom of the Perl Monks concerning the following question:

Howdy monks,

Recently I've been accustomed to update parrot and try some perl6 as my recreation. Below is a small question I come across when I ramble over it
C:\parrot>perl6 -e "my IO $fh;" get_bool() not implemented in class 'IO' current instr.: 'parrot;PCT::HLLCompiler;command_line' pc 1311 (src\PC +T\HLLCompi ler.pir:711) called from Sub 'parrot;Perl6::Compiler;main' pc 11945 (perl6.pir:173) C:\parrot>perl6 -e "my IO $fh; say $fh.WHAT;" IO
Why does not the second statement toss a error? or is it a feature?

Any guru give me some insight into this question?
Thanks in advance!

I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

Replies are listed 'Best First'.
Re: A small question about perl6
by ikegami (Patriarch) on Jun 18, 2008 at 15:07 UTC

    Sounds like the interpreter wants to know the value of the last statement it executes.

    say returns something it can work with.
    my doesn't or this my creates doesn't.

    Pure speculation based solely on what you posted.

      That sounds right to me.

Re: A small question about perl6
by Anonymous Monk on Jun 18, 2008 at 07:40 UTC
    because its not ready yet?
    Search engine fun 1 2 3
    16:31 moritz_ rakudo: say |(1, 2, 3) + + + + 16:31 exp_evalbot rakudo r28145 OUTPUT[␤get_bool() not implemented + in class 'Junction'␤current instr.: 'parrot;PCT::HLLCompiler;comm +and_line' pc 1288 (src/PCT/HLLCompiler.pir:688)␤ + + 16:31 moritz_ pugs: say |(1, 2, 3) + + + + 16:31 exp_evalbot OUTPUT[123␤] + + + + 16:32 [particle] seems rakudo doesn't have prefix:| + + + + 16:32 [particle] or is it the |() op? + + + + 16:32 moritz_ prefix:| + + + + 16:34 diakopter wow; that was almost trivial + + + + 16:34 moritz_ diakopter: what, adding prefix:| to yap6? + + + + 16:35 diakopter (adding infinite recursion detection to the recurs +ive-descent-parser framework)
      But why
      perl6 -e "my IO $fh; say $fh.what;"
      could be run successfully?

      I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction
Re: A small question about perl6
by jethro (Monsignor) on Jun 18, 2008 at 11:04 UTC
    Wild guess:

    Maybe there is already detection of unused variables programmed into rakudo. And that detection does an additional check on the IO object.