3 ms·
Lack of sum types and thus impossibility of just having Result<T,E>-like type for returning errors is bigger one for me, I didn't get bitten by nulls all that m
by ilyt 3y ago
Lack of sum types and thus impossibility of just having Result<T,E>-like type for returning errors is bigger one for me, I didn't get bitten by nulls all that much in Go
Although I guess that feeds into eachother, sum types would eliminate any need for null types in the first place.
- whimsicalism 3y agoYes, sum types would solve the problem - you are both identifying the same issue imo
- packetlost 3y agoI would have taken sum types over generics, personally. It kinda sucks because you can't create something like Rust's `?` operator without them or making serious kludgy compromises.