Thanks for the glimpse! I wonder if we will regret not putting the error variant
in an opt
, which is necessary if you want to extend the set of variant tags (e.g. errors) later in a backwards-comlatible way. Is it too late to change that?
Yuck, although I just noticed that with the latest iteration of subtyping on Candid values, the idea of wrapping variant
in opt
to make them extensible doesn’t work: with the subtype check on the level of types, such an extended opt type will always be null
, even if a known tag is observed. I will bring this up in the Candid repo.