| [reply] |
The problem goes away if you don't use trailing if() statements modifying my() statements. The trailing if() isn't the problem; the problem is when it's modifying a my() statement. Disallow that. Later, when they're ready, they'll ask why that specific prohibition and you'll explain it to them and they'll understand. In fact, you can almost consider that a rite of passage from journeyman to master.
- In general, if you think something isn't in Perl, try it out, because it usually is. :-)
- "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"
| [reply] |
I consider myself an "average" perl developer. I've never been a full-time developer, but I instantly understood the my $xx if () problem when I meet it, and avoid it since then.
| [reply] [d/l] |
Sure, I could do it that way, but it's one more thing to remember, and since I don't actually need trailing if() for anything it's easier to just not use it. I tend to favor a coding style based on the fewest traps to remember and am willing to sacrifice lots of things that are cool but not really necessary in order to get there.
| [reply] |
import re
re.sub(r'Perl[^A-Za-z]*', 'Python ', 'Perl6::Rules')
| [reply] [d/l] |