develooper Front page | perl.perl5.porters | Postings from August 2012

Chiming in on the smart match debate

Thread Next
John Wiersba
August 23, 2012 12:44
Chiming in on the smart match debate
Message ID:
I just got around to reading brian d foy's blog post of a week ago about smart match (  I don't use or teach others to use smart matching because: 1) it's too complicated, 2) there's not much, if any, benefit over the equivalent underlying calls, and 3) it's not portable.  Yes, it can be used to do some cool things, like smart matching against the elements of a heterogeneous array or matching against the keys of a hash, but the benefit is not worth the uncertainty, bugs, non-portability, etc.  If it were simplified, maybe.  

My perl coding philosophy is to stay as close to the core language as possible.  Even then, I still find bugs when I stray just slightly from the center (e.g. I just reported #114498 against all perl versions).  Perl is wonderful in many, many ways, but it doesn't need more cool-but-complicated features with little benefit.  It needs clean, clear, well-defined semantics that interact well with the already existing features.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About