2 ms·
"After learning more languages, Ruby is starting to become pretty ugly to me, but somehow people keep managing to ignore all its faults, make little hacks like
by raganwald 19y ago
"After learning more languages, Ruby is starting to become pretty ugly to me, but somehow people keep managing to ignore all its faults, make little hacks like these, and be very productive with it."
When I first saw it, I wondered why anyone would want this irregular little language when they could just use Smalltalk or Scheme. An early rant asked why I have to know the difference between a block and a Proc: why the &^(%*)(& do I have to know when to use a block, when to use a Proc, and how to convert between them???
- mdemare 19y agoFor those who think the above is pretty tame and have been using it for years, we've got a series on our blog where we introduce and discuss a new method every day. http://blog.rubyenrails.nl/articles/category/daily_method http://blog.rubyenrails.nl/articles/category/daily_method Here we create a to_proc method for Hash: http://blog.rubyenrails.nl/articles/2008/02/26/a-hash-is-a-function-hash-to_proc http://blog.rubyenrails.nl/articles/2008/02/26/a-hash-is-a-f...
- raganwald 19y agoI subscribe to the series and enjoy it. I hadn't seen Hash#to_proc, I look forward to considering the possibilities carefully...