September 12 DIP Ideas » Re: Enumerated Unions (sum types) | |||
|---|---|---|---|
| |||
...it should be explicitly said that accessing `__tag` is `@safe`. Ah, OK. I missed that... | |||
September 12 DIP Ideas » Re: Enumerated Unions (sum types) | |||
|---|---|---|---|
| |||
Also, the tag field itself will be visible to reflection (via `__traits(allMembers)`, which includes... | |||
September 12 DIP Ideas » Re: Enumerated Unions (sum types) | |||
|---|---|---|---|
| |||
...with the tag field included. When the DIP says "the size of the tag field... | |||
September 12 DIP Ideas » Sum Type by Struct | |||
|---|---|---|---|
| |||
...dlang.org/post/xtmwtmkhmufpzeyrsxsb@forum.dlang.org). Tag names are optional, if you use the... | |||
September 12 DIP Ideas » Re: Enumerated Unions (sum types) | |||
|---|---|---|---|
| |||
...the existence, size and alignment of the tag field has to be known. That's... | |||
September 12 DIP Ideas » Re: Enumerated Unions (sum types) | |||
|---|---|---|---|
| |||
`__tag` is an rvalue property, and the intent is that the `size_t` it returns... | |||
September 12 DIP Ideas » Re: Enumerated Unions (sum types) | |||
|---|---|---|---|
| |||
...tag property would be a getter as opposed to a direct field accessor the tag... | |||
September 12 DIP Ideas » Re: Enumerated Unions (sum types) | |||
|---|---|---|---|
| |||
...opaque. By "tag type" I assume you mean the type of the __tag property. Is... | |||
September 12 DIP Ideas » Re: Enumerated Unions (sum types) | |||
|---|---|---|---|
| |||
...the destructor should run any time the tag changes, even if the new field has... | |||
September 12 DIP Ideas » Re: Enumerated Unions (sum types) | |||
|---|---|---|---|
| |||
...method. Ideally, most users would use pattern matching, and never have to check `__tag` directly. | |||
Copyright © 1999-2021 by the D Language Foundation