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

I share your hesitation. Those that are little-known tricks would cause any reader to do a double-take.


Very true, however Ruby is still very much growing in popularity and growing as a language. Therefore, if you employ a "little-known trick" and somehow it becomes popular, it is no longer little-known and it becomes a "standard idiom."

This is not automatic, but I suggest the possibility is much greater with Ruby than with certain other languages for various reasons, and therefore it is at least worth considering a new idiom in Ruby rather than rejecting it outright.

One of the ways you can make your favourite idiom popular is to blog about it, of course. Or perhaps to write something really popular and use your idiom in it, such as returning() {...} or perhaps Symbol#to_proc.

http://weblog.raganwald.com/2008/02/1100inject.html




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: