[Issue 3969] Built-in compile time errors against usage of wrong operator strings

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 20 16:43:33 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=3969



--- Comment #2 from bearophile_hugs at eml.cc 2012-12-20 16:43:32 PST ---
(In reply to comment #1)

> However I think this can only work for simple cases, e.g.:

I agree it can't work for all cases.


> So is it worth having? I'm very fond of the idea personally, at least for case
> #1.

Is it worth having a not complete error reporting feature? Generally we want an
error reporting to work in all cases, so the programmer can rely on it. On the
other hand what's really important for an error is to be reliable, this means
no false positives. I think in this case it's possible to avoid all false
positives, the presence of some inevitable false negatives.

And I think the code of a new D programmer is mostly of cases 1 and 2, that are
the simpler to detect. So I think this feature is worth having.

If in future D will add some more user defined operators (like a needed second
multiplication useful for matrix multiplications), it will probably easy enough
to extend and fix this error reporting.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list