_All_ routines in Perl 6 return _something._ A lack of a "-->" simply
indicates stylistically that the return is not useful because it's whatever
"falls off the end". (There's a bit of variance here as I'm not sure it's a
convention everyone has followed.) It's equivalent to "--> Mu" because
anything that could "fall of the end" is Mu.

On Wed, Oct 3, 2018 at 21:07 ToddAndMargo <toddandma...@zoho.com> wrote:

> Hi All,
>
> In another thread, Timo wrote me:
>
>         The "-->" part of the signature is optional. If there isn't
>         one, it defaults to Mu, which is the type that everything
>         conforms to, i.e. the sub or method that either has "--> Mu"
>         explicitly, or has it by leaving it out, may return
>         absolutely whatever it wants.
>
>         After all, the "-->" part is a constraint, and it gets
>         validated at compile time every time a sub or method
>         returns.
>
> I got to thinking, some routines do not return anything.  Without
> the "-->" constraint, how am I to determine if something is
> being returned?
>
> Yours in confusion,
> -T
>

Reply via email to