Library Design: Naming Conventions – Option & Result (soc.me)
from soc@programming.dev to programming_languages@programming.dev on 30 Jul 21:15
https://programming.dev/post/34812607

#programming_languages

threaded - newest

soc@programming.dev on 30 Jul 21:20 collapse

Many 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.

mobotsar@sh.itjust.works on 30 Jul 22:50 collapse

Pass and Fail

You really wanted them to have the same number of letters, eh? Haha.

soc@programming.dev on 31 Jul 08:28 collapse

Yeah, avoids pointless debates whether they should be lined up in matches or not. :-)