Moment of Ruby: An Argument for Nothing (aha.io)

31 points by zemptime 3 days ago

2 comments:

by matharmin 36 minutes ago

It's an interesting trick, but for a setter method you really need to use `def cloaking=(value)` instead of overloading the same method. It would help to give a more realistic example for where this technique can be useful.

by semiquaver 26 minutes ago

Wow, I wrote Ruby for 15+ years and never saw this trick!

Data from: Hacker News, provided by Hacker News (unofficial) API