> If you can't distinguish braces and parentheses (or quotes and
> backquotes in some other fonts), you are in deep trouble in many
> languages including perl5 BTW.

I've seldom found myself mistaking a brace for a paren
or a quote for a backquote when using Perl 5. So maybe
you are right.

But maybe not. Given that I have another definite concern,
mentioned below, I'll spray just a little bit more before I
pedal off.

I suspect the reason I didn't fall foul of '` and ({ ambiguity
in Perl 5 might be due to other cues being present.

If it looks like:

    $stdout = '/bin/foo -abc def';

then those quotes are probably backquotes.

If I see

    sub foo (
        ...
    )

then I know those parens are probably braces.

But I'm not sure the cues will be so clear for the
pattern embedded code interpolation and assertion
cases.

And here's where I add my other small niggle: it's not
clear to me /mnemonically/ which is which. Even if
you can tell which is a brace and which a paren, you
are still left wondering what each does when you're
learning this new stuff. I mean, which one of these is
executing some code to return a boolean assertion,
and which one a string value to be interpolated?

    $rx1 = rx / foo <( bar )> qux /;
    $rx2 = rx / foo <{ baz }> qux /;

But then again, the above is obviously contrived.
I've got my clips on; I'm outta here.

--
ralph

Reply via email to