4 ms·
When using either in that kind of language, you basically want to catch exceptions at the bind level and put the exception result in the left hand side. The ma
by mikekchar 8y ago
When using either in that kind of language, you basically want to catch exceptions at the bind level and put the exception result in the left hand side. The main advantage of this is that you are guaranteed not to jump stack levels higher than the call to bind (or whatever he's calling it in his RR architecture -- I haven't read TFA lately).
When using Either in that way, I tend to think of it as a structured exception. It gives you a defined exit point, just like in other structured programming. I've tried to introduce this on our team and probably there is about 50/50 acceptance. Half of the people think it is awesome, half of the people can't see the point, so I think it's probably an acquired taste.