#programming_languages
threaded - newest
Many languages’ Option and Result types suffer from an organically-grown and therefore inconsistently named set of functions that operate on them.
Option
Result
We can do better! The article demonstrates how a full set of useful methods with predictable names can be derived from few, simple rules.
Pass and Fail
Pass
Fail
You really wanted them to have the same number of letters, eh? Haha.
Yeah, avoids pointless debates whether they should be lined up in matches or not. :-)
threaded - newest
Many languages’
Option
andResult
types suffer from an organically-grown and therefore inconsistently named set of functions that operate on them.We can do better! The article demonstrates how a full set of useful methods with predictable names can be derived from few, simple rules.
You really wanted them to have the same number of letters, eh? Haha.
Yeah, avoids pointless debates whether they should be lined up in matches or not. :-)