sr@blz.hmrprint.com (via RT): # I just wondering, why does Perl allow you to use supposedly reserved words # for a sub (function) identifier? This is a feature, not a bug. Perl allows you to use reserved words as identifiers because there's no good reason *not* to. Remember, you can call a function with an ampersand (&), so it's not like there's no way to access a function with the same name as a reserved word. Moreover, it's good for backwards compatibility. How many programs had functions called lock() before we added threads (and thus locks) to Perl? People weren't forced to rewrite those programs *because* Perl allows functions to have the same names as built-ins. That's not to say we encourage naming functions after reserved words. I doubt anybody would call that "good style". But if there's no technical reason to stop it, why do so? --Brent Dax <brent@brentdax.com> Perl and Parrot hacker "Yeah, and my underwear is flame-retardant--that doesn't mean I'm gonna set myself on fire to prove it."Thread Previous