19 ms·
Yeah, I agree. My language has both maybe<T> and result<T>, and maybe<T> is exceptionally convenient for all sorts of things. As an example, the result of divis
by mathgladiator 3y ago
Yeah, I agree. My language has both maybe<T> and result<T>, and maybe<T> is exceptionally convenient for all sorts of things. As an example, the result of division is a maybe<double> and I have all the typical operations defined between maybe<double> and double so maybe<double> + double is a maybe<double>. It feels nice to force people to think about the edge conditions of why something isn't present.