c/programming_languages · by soc@programming.dev · 1yLibrary Design: Naming Conventions – Option & Result https://soc.me/languages/naming-conventions-option-and-result2 points · 3 comments · view on lemmy.world
3 Comments
soc@programming.dev · 1 pts · 1y
Many languages'
OptionandResulttypes 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.
mobotsar@sh.itjust.works · 1 pts · 1y
You really wanted them to have the same number of letters, eh? Haha.
soc@programming.dev · 1 pts · 1y
Yeah, avoids pointless debates whether they should be lined up in matches or not. :-)