Raku / book

Using Raku – an unfinished book about Raku
https://perl6book.com/
283 stars 49 forks source link

[TODO] explain where whitespace is needed #53

Open moritz opened 13 years ago

moritz commented 13 years ago

miso2217 complained on #perl6 that there's no good documentation about where whitespace is needed. For example we need to explain that (and why) these two things are illegal:

 if(1) {  } # function call
 if 1{ }    # parses { } as postcircumfix
jeteve commented 13 years ago

I've been caught by this one :)

miso2217 commented 13 years ago

It was originally from a block like this: if (1){ say 1; } else{ say 2; }

What is a very classic "c/c++ background programmer" way of writing an if statement. This gives the following error: Missing block at line 9, near "else{\n sa".