news
52

Moment of Ruby: An Argument for Nothing
2026-11-05A Ruby developer highlights a compact pattern for methods that act as both getters and setters: pass an argument to update a setting, or omit it to read the current value. The technique distinguishes “no argument” from an explicit nil, making the API concise and surprisingly useful.
Comments
0Discuss on Hacker NewsOnly full members can comment
Log in to express your opinion.
No comments yet.