soc@programming.dev to Programming Languages@programming.devEnglish · 5 months agoLibrary Design: Naming Conventions – Option & Resultsoc.meexternal-linkmessage-square3fedilinkarrow-up12arrow-down10
arrow-up12arrow-down1external-linkLibrary Design: Naming Conventions – Option & Resultsoc.mesoc@programming.dev to Programming Languages@programming.devEnglish · 5 months agomessage-square3fedilink
minus-squaresoc@programming.devOPlinkfedilinkarrow-up1·edit-25 months agoMany languages’ Option and Result 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.
minus-squaremobotsar@sh.itjust.workslinkfedilinkEnglisharrow-up1·5 months ago Pass and Fail You really wanted them to have the same number of letters, eh? Haha.
minus-squaresoc@programming.devOPlinkfedilinkarrow-up1·5 months agoYeah, avoids pointless debates whether they should be lined up in matches or not. :-)
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.
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. :-)