wolverian wrote:
Hello all,

while writing some experimental code with Pugs, I realised that it is a
bit hard for me to parse the following type of declaration:

    sub greeting (Str $person) returns Str is export {
        "Hello, $person"
    }

don't know if it helps, but I guess that you can also write it like this, if you prefer:


    sub greeting(Str $person) {
        returns Str;
        is export;
        "Hello, $person";
    }

(this guess is based on something I recall having read in A12 about classes; if my guess is wrong, I'll be happy to stand corrected :-).

cheers,
Aldo

Reply via email to