Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Totally untrue.

Personally, I never use any of these constructs. I never see them in any modules I use. None of my friends use these. (And trust me, if you know Perl, you know my friends.) The only place I see them is during conference talks about "strange things that happen to be possible with Perl syntax".

Do I know what they do? Yes. Would I freak out if I saw them in someone's code? No. Would I add them to my own code when a clearer construct would suffice? Never.

Just because you would never use these constructs in Real Code doesn't mean that this is not something that's fun to think about. Are you a code monkey, or can you step back from the "must implement maintainable application in 42 hours OR DIE" and enjoy the art of programming?



If these things are almost never used or should never be used, why are they allowed to exist?


For the most part, they don't exist! Only the <=> operator in that list actually exists. The rest are combinations of perfectly sensible operators.

"Why does Haskell have (.) . (.)?" It doesn't. It's just a combination of legal characters that happens to also be a joke.

(And as wacky as <=> may appear, in the context of Perl, with its separate string vs. numeric comparison operators, it's not even that strange. It is a combination less than, equal, or greater than operator. "cmp" is the equivalent for strings.)


TMTOWTDI (http://en.wikipedia.org/wiki/There%27s_more_than_one_way_to_...)

Such freedom is at the core of the language.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: