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

Chiming in on the smart match debate

Thread Next
From:
John Wiersba
Date:
August 23, 2012 12:44
Subject:
Chiming in on the smart match debate
Message ID:
1345751077.40333.YahooMailNeo@web161504.mail.bf1.yahoo.com
I just got around to reading brian d foy's blog post of a week ago about smart match (http://blogs.perl.org/users/brian_d_foy/2012/08/ricardo-is-pushing-for-smart-match-changes.html).  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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About