Hacker News new | ask | show | jobs
by ballpointcarrot 3469 days ago
Some people prefer their languages to be more concise, and the safety of the the option objects (and the requirement of the unwrap() calls in the function chain) feels unwieldy. Moreover, as the unwrap() calls could panic if there's no attribute, the more complete handling of it is even longer (match calls and following the successful path).

This could be a function to isolate just the attribute you need, but seeing the example as it is presented can be off-putting from people used to scripting languages like ruby/python, which are more concise.