std.sumtype?
Oleg B
code.viator at gmail.com
Thu Mar 18 14:42:03 UTC 2021
Hello everyone.
Went to see what is being prepared in the new compiler and saw
this
https://dlang.org/changelog/pending.html#std-sumtype
Is this realy final variant for including to phobos, not
std.experimental? No way for getting tag explicitly (it's
private), no way for getting type by tag, sumtype depend on order
of types... I don't see any discussion about including it to
phobos... Why? Nobody cares?
I think algebraic types must be in phobos, but it must be fully
complited. Otherwise it not neccessary: side libs will fix some
misses and we don't get unified algebraics.
For example std.json have no [de]serialization and vibe.data.json
is more useful and used in many projects.
More general question: why phobos so bad structured? No way to
determine what can be used without gc, that need it (other D
features like betterC in the same situation). Some basic actions
requires couple of std libs (std.file, std.path etc). Why
something things placed in experimental will be in experimental
during several years, other placed to std directly (sumtype)?
May be it's time to restructure std, and determine algorithm for
place new code to it (like DIPs)?
More information about the Digitalmars-d
mailing list