On most real life projects, the speed of development is easily worth an occasional corner case bug with an unexpected nil value … except when it isn’t.
speed of development vs. safety
On most real life projects, the speed of development is easily worth an occasional corner case bug with an unexpected nil value … except when it isn’t.
speed of development vs. safety
You may use keyword arguments in your filters for type safety and better readable code.
So, despite your code is type safe it is not safe to be used.
Make your functions return something meaningful, typed, and safe!
In other words, once you've used Maybe you cannot hit nil with a missing method. This is remarkable because even &. doesn't save you from omitting || "No state" at the end of the computation. Basically, that's what they call "Type Safety".
For now I've worked around this by putting all the key-value pairs into an array before passing them into the interaction, then re-building the hash inside the interaction. It works, but it requires some extra code
You can use it by allowing a hash with arbitrary keys, but that loses type-safety one that object.