std.sumtype?

SealabJaster sealabjaster at gmail.com
Sun Aug 29 19:29:29 UTC 2021


On Sunday, 29 August 2021 at 19:19:54 UTC, SealabJaster wrote:
> ...

While I'm on a tiny rant, I'd like to just mention that compiler 
errors with SumType can be a bit obtuse.

It's often annoying when you're using a generic case but due to a 
compiler error that the SumType eats up, all you get is 
"handler[x] is never matched" or "type X is unhandled", etc.

Usually all you have to do is make a specific case for the 
type(s) causing the issue, but it's just a bit of extra work I'd 
rather not do. I appreciate that it's not really possible/easy to 
distinguish the case of "this handler *does* handle this type, it 
just doesn't compile due to an error in the body" though.


More information about the Digitalmars-d mailing list