Re: Weird! When legal?

2021-02-24 Thread Brian Duggan
On Wednesday, February 24, rir wrote: > That is helpful. I don't think it conclusive. Since I am stating > the initial term is unknown, I think there is no legal statement > possible. This is legal -- class samesame { hello samesame } sub hello($x) {} sub sameasame { "hello" } Brian

Re: Weird! When legal?

2021-02-24 Thread rir
Gianni, That is helpful. I don't think it conclusive. Since I am stating the initial term is unknown, I think there is no legal statement possible. A sigilless variable could also start a statement. I suppose textual parsing the terms of a statement is attempted before checking the

Re: Weird! When legal?

2021-02-24 Thread Gianni Ceccarelli
On 2021-02-24 rir wrote: > It is just an odd puzzle for me that "UnknownBareId KnownClassId" > is accepted has the start of a valid statement. How would such > a statement be completed? Let's go through a few examples:: raku -e 'foo 1' ===SORRY!=== Error while compiling -e Undeclared

Re: Weird! When legal?

2021-02-24 Thread rir
This started with my mis-remembering "multi method" like: class Myclass { multi-method Rat { 'Rat' } } Then wondering why is Raku accepting the unknown 'multi-method' followed by a known classname; and only tripping over the block or parentheses. It is just an odd puzzle for me that

Re: Weird! When legal?

2021-02-24 Thread Elizabeth Mattijsen
$ raku -e 'class samesame { hello samesame, { say "Wosup?" } }' ===SORRY!=== Error while compiling -e Undeclared routine: hello used at line 1. Did you mean 'shell'? Are you missing a comma there? Did you intend to call the "hello" subroutine, with "samesame" and the block as parameters?

Weird! When legal?

2021-02-24 Thread rir
Hello, > class samesame { hello samesame { say "Wosup?" } } ===SORRY!=== Error while compiling: Unexpected block in infix position (missing statement control word before the expression?) --> class samesame { hello samesameā { say "Wosup?" } } expecting any of: infix