[Oc-pm] perl6 if

Mike Baas mike at mikebaas.org
Sat Dec 30 07:35:33 PST 2017


I like squigglies and optional parens.  I don't like bash's lack of
restraints.  I wish bash was perl almost everytime.

On Fri, Dec 29, 2017 at 10:43 AM, Bob Mathews <bobmath11 at icloud.com> wrote:
> We're going to be talking Control Flow in perl6 for January's meeting,
> right?
>
> Most major languages these days have C-derived syntax. An if statement looks
> like this:
>
> if (...) { ... } else { ... }
>
> In most C-derived languages, the parens are required, but the squiggle
> brackets are optional. (This causes some ambiguity when the "..."s contain
> other if statements, but whatever.) In perl5, both the parens and squigglies
> are required. But in perl6, the parens are optional and the squigglies are
> required. Not sure why they decided to go the opposite direction from every
> other language, but again, whatever.
>
> I tend to prefer the Bourne shell syntax:
>
> if ... then ... else ... fi
>
> But I suppose that's horribly old-fashioned. Anyway, just my two cents.
> Anyone have any thoughts?
>
>  -bob
>
>
> _______________________________________________
> Oc-pm mailing list
> Oc-pm at pm.org
> http://mail.pm.org/mailman/listinfo/oc-pm
>


More information about the Oc-pm mailing list