bettersum (v0.7.0): mixin-based sumtypes
DanielG
simpletangent at gmail.com
Wed Oct 7 02:24:40 UTC 2026
Dub package:
https://code.dlang.org/packages/bettersum
GitHub repo:
https://github.com/dewf/bettersum
Check the README for usage.
I realized a few weeks back that I could probably get 90% of what
I want (minus legit pattern-matching) from sumtypes just by
writing a mixin. So, here we are.
Feel free to suggest ideas for even more concise or useful
pattern-matching-like idioms. I did what I could with what I
know, which admittedly ain't much :)
I need to return to a more important project for awhile, but I
hope to get this to a v1.0 release by the end of the year.
Note: the first thing I want to fix in the near future, is the
error reporting (for parsing errors) - it will be off by a token
length, column-wise - and is very likely broken in other ways.
Plus I haven't tested the parser much, so don't expect it to be
robust against weirdness.
Also I need to update the example to show how to use snake_case
instead (ew).
We'll get there!
More information about the Digitalmars-d-announce
mailing list