On Sun Apr 22 19:30:13 2012, ikegami@adaelis.com wrote: > 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. Given an mistake as easy to make as this: if($foo) { }; else { $bar } do you think it is acceptable for syntax error at - line 2, near "else" Execution of - aborted due to compilation errors. to become Can't call method "else" on an undefined value at - line 2. ? Maybe it is. -- Father Chrysostomos --- via perlbug: queue: perl5 status: open https://rt.perl.org:443/rt3/Ticket/Display.html?id=108286Thread Next