Hacker News new | ask | show | jobs
by skrebbel 731 days ago
But that’s way less clear than just

    if struct.foo do struct.foo.bar else nil end
1 comments

Sure, this snippet is a trivial example and doesn't sufficiently motivate get_in and family, which can be much more powerful when needs aren't so simple.

It's also very hard to be as concise with more vanilla syntax when competing with put_in/update_in instead. The pattern and ability to generalize it is valuable IME.