Remix.run Logo
▲ Fluorescence 16 hours ago

It's nice.

I'm an old developer... I recognise the instinct to resent and avoid new unfamiliar syntax when I've got something that works for me. After some resistance, I give it a go, maybe working on someone else's code that uses it... and then it's suddenly "damn, the lang designers knew what they were doing".

This is one of those. What you might miss is that nested optionality is often the cleanest accurate representation and not error states e.g. a hierarchy of capabilities as a tree of options getting progressively more fine-grained yet you need to work with fine-grained capabilities at the leaves.

Nested optionality appears to be a bad data-structure to avoid when the code it requires is verbose and gruelling. Workarounds to reshape or design for less gruelling code are anti-patterns, adding complexity not to model the problem but to solve a language design weakness, which this solves.