draft proposal for Sum Types for D
deadalnix
deadalnix at gmail.com
Fri Dec 2 21:28:43 UTC 2022
On Friday, 2 December 2022 at 16:43:45 UTC, Tejas wrote:
> Is it possible to make the syntax `int|float|char` style? We
> could parameterize it as `alias type(T) =
> int|float|customType!T;`
>
> Or will it mess with bitwise expressions too much? It _kinda_
> shouldn't since all the operands in bitwise or are variables,
> but here they will _all_ be types
It 100% will, because the next step in enlightenment here is to
realize that literal are also types with one value, and that the
definitively belong in there.
More information about the Digitalmars-d
mailing list