3 ms·
I used to do a little c++ as a student and never found a way to correctly handle error using exceptions. I am now a scala user, and in scala Either is the canon
by gbersac 9y ago
I used to do a little c++ as a student and never found a way to correctly handle error using exceptions. I am now a scala user, and in scala Either is the canonical way to handle errors. I understood the Either construct quickly and after a year using it, I wouldn't come back to the c++ exception.
Note that in c++, the absence of algebraic data type made it a little bit hard to understand how Either is coded.