You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you help how to replace it? This mirrors the typejoin and other behaviour of Nothing and Missing, how to do without promote_type? (I remember that Nothing and missing used this, but I may be wrong)
Would simply overloading promote_rule instead of promote_type work?
I'm not otherwise familiar with this package, but I took a look at the implementation now, and it seems to me that it's deeply flawed. For example, this:
const Either{L, R} = Union{Const{L}, Identity{R}}
... should instead look something like:
struct Either{L, R}
v::Rend
So, it seems to me that you're misusing Union when you should be defining a new, named, type.
Please, I ask you to be more respectful towards code you may not understand.
The types are carefully chosen and have advantages over defining structs.
As already said, the types Const and Identity behave similar to Nothing and Missing in that Union types get explicitly constructed. If you can tell me how to change the implementation without using promote_type, while not changing the type definitions, I am very happy to change it.
Several methods are added for
promote_type
in this package. Xref JuliaLang/julia#54138The text was updated successfully, but these errors were encountered: