[LRUG] What makes a truly horrendous Ruby hack?
Paul Battley
pbattley at gmail.com
Tue Sep 9 01:21:41 PDT 2008
Dan's talk yesterday reminded me of another horrendous hack I wrote a
couple of years ago. It lets you do PHP/Perlish things like 1 + '2' ==
3:
http://po-ru.com/diary/ruby-heresy/
Writing it taught me a lot about how Ruby's coercion mechanism works.
As Dan showed, these kinds of hacks can be quite illuminating. But
knowledge is knowing that a tomato is a fruit; wisdom is not trying to
put it in a fruit salad. Don't put them in your production code!
Paul.
More information about the Chat
mailing list