On Sun, Apr 22, 2012 at 4:56 PM, Father Chrysostomos via RT <
perlbug-comment@perl.org> wrote:
> Another way of putting it: Should there by a sub named CORE::elsif that
> produces a syntax error when inlined? Or should there be no CORE::elsif
> sub at all, elsif only being treated as a keyword after if(){} or elsif{}?
>
> I’m leaning toward the former right now, as it avoids changing the
> behaviour unnecessarily.
>
Would you recommend this behaviour to someone else? Say someone introduces
a C<< with ... in ... >> statement. Should they override C<< in >> so that
C<< in(); >> is a syntax error?
It's going to be fun telling people that Perl goes out of its way to make
C<< elsif(); >> a syntax error just so users can ask Perl not to make it a
syntax error.
- Eric
Thread Previous