Better error messages - from reddit
rikki cattermole
rikki at cattermole.co.nz
Mon Mar 4 17:20:15 UTC 2019
On 05/03/2019 5:49 AM, Sebastiaan Koppe wrote:
> With Rust a type declares to conform to a trait explicitly. Error
> messages are easy.
>
> With D it seems we are reinventing traits, poorly. And all because we
> wanted to avoid naming them?
Rust traits and Swift's Protocols are what I think of as inverse signatures.
The concept itself dates back to ML, where the signature has the
capacity to adapt to the implementation to some degree. We can do this
in D probably better than any other language and not require a horrible
linking "type".
But the DIP is going to be massive and it will mean Phobos will get an
almost complete redesign. Its not something I'm bringing to the table
until I'm very sure that I have it completely nailed down and not just
the basic semantics. It has potential for being D's killer feature. But
it could also never make it out of community review. Its worth waiting
for, now that these issues have matured quite a bit.
More information about the Digitalmars-d
mailing list