sumtypes for D
jmh530
john.michael.hall at gmail.com
Wed Nov 30 15:03:30 UTC 2022
On Wednesday, 30 November 2022 at 13:45:09 UTC, Paul Backus wrote:
> [snip]
>
> - User-defined implicit conversions.
> - Returning error messages from failed `is(...)` and
> `__traits(compiles)` checks instead of just `false`.
> - Allowing library code to *display* its own custom error
> messages, with the same control and flexibility the compiler
> has for built-in messages (currently we only have `static
> assert`).
> - User-defined GC scanning for library types (`opGCScan`?).
> - User-defined value ranges for aggregate fields (e.g., pointer
> that can't be null, integer that can't go above/below a certain
> limit).
>
> All of these are things that built-in types have access to
> already, and all of these would have useful applications beyond
> just sum types.
Not sure what is meant by the above about template type
inference, but here are enhancement requests for what Paul
mentioned.
https://issues.dlang.org/show_bug.cgi?id=23523
https://issues.dlang.org/show_bug.cgi?id=23527
https://issues.dlang.org/show_bug.cgi?id=23526
https://issues.dlang.org/show_bug.cgi?id=23525
https://issues.dlang.org/show_bug.cgi?id=23524
Feel free to add more info there to further explain what you are
looking for.
More information about the Digitalmars-d
mailing list