Re: taggedalgebraic 0.11.0 adds TaggedUnion

2019-02-23 Thread Sönke Ludwig via Digitalmars-d-announce
Am 23.02.2019 um 20:19 schrieb Paul Backus: On Friday, 22 February 2019 at 17:09:41 UTC, Sönke Ludwig wrote:  - Behaves like a POD if only POD fields exist, is non-copyable if any    contained type is non-copyable etc. In fact, if a contained type is non-copyable, it fails to compile altogeth

Re: taggedalgebraic 0.11.0 adds TaggedUnion

2019-02-23 Thread Sönke Ludwig via Digitalmars-d-announce
Am 23.02.2019 um 21:46 schrieb Sönke Ludwig: Am 23.02.2019 um 20:19 schrieb Paul Backus: On Friday, 22 February 2019 at 17:09:41 UTC, Sönke Ludwig wrote:  - Behaves like a POD if only POD fields exist, is non-copyable if any    contained type is non-copyable etc. In fact, if a contained type

Re: taggedalgebraic 0.11.0 adds TaggedUnion

2019-02-23 Thread Paul Backus via Digitalmars-d-announce
On Friday, 22 February 2019 at 17:09:41 UTC, Sönke Ludwig wrote: - Behaves like a POD if only POD fields exist, is non-copyable if any contained type is non-copyable etc. In fact, if a contained type is non-copyable, it fails to compile altogether. (Example code below.) Granted, so do A

Re: taggedalgebraic 0.11.0 adds TaggedUnion

2019-02-23 Thread Sönke Ludwig via Digitalmars-d-announce
Am 23.02.2019 um 14:18 schrieb Sönke Ludwig: Am 23.02.2019 um 09:51 schrieb Jacob Carlborg: (...) Why not using property syntax, i.e. `val.height = 10`? The main reason is to distinguish the act of setting a new value from the one of modifying an existing value. In the former case it is okay

Re: taggedalgebraic 0.11.0 adds TaggedUnion

2019-02-23 Thread Sönke Ludwig via Digitalmars-d-announce
Am 23.02.2019 um 09:51 schrieb Jacob Carlborg: On 2019-02-22 18:09, Sönke Ludwig wrote: TaggedUnion is the low level tagged union functionality separated out from TaggedAlgebraic. Because it doesn't support transparent access of methods and operators of the contained value, it is able to provid

Re: taggedalgebraic 0.11.0 adds TaggedUnion

2019-02-23 Thread Jacob Carlborg via Digitalmars-d-announce
On 2019-02-22 18:09, Sönke Ludwig wrote: TaggedUnion is the low level tagged union functionality separated out from TaggedAlgebraic. Because it doesn't support transparent access of methods and operators of the contained value, it is able to provide a number of convenience features. On top of t

taggedalgebraic 0.11.0 adds TaggedUnion

2019-02-22 Thread Sönke Ludwig via Digitalmars-d-announce
TaggedUnion is the low level tagged union functionality separated out from TaggedAlgebraic. Because it doesn't support transparent access of methods and operators of the contained value, it is able to provide a number of convenience features. On top of that, visit and tryVisit is now supported