User-defined template error messages
rikki cattermole
rikki at cattermole.co.nz
Sun Jan 13 19:28:05 UTC 2019
This is a great example of why I want signatures.
Having a concrete type that gives us a way to verify complex types
clearly and without using complex CTFE or templates is a must if we want
to help new users into D in the future.
Most importantly it needs to be baked into the type system enough that
it allows conversion to a vtable as well as compile time verification of
the input types implicitly. Based upon my experiments (so the type
itself can adapt to an implementation).
The other problem is it needs some way to model internal attributes that
are set externally (e.g. InputRange.Type), my named parameter DIP was
based upon this requirement.
To go this direction won't be easy. So far my designs result in being
able to do OOP in them and strangely they seem to be far more like best
practice OOP than classes ever were. But alas it could just be the fact
that I designed them talking ;)
More information about the Digitalmars-d
mailing list