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
infix
$ 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?
If
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 "UnknownBa
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 rou
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 meaningfulne
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