DMD spellchecker
H. S. Teoh
hsteoh at quickfur.ath.cx
Wed Jul 17 12:36:19 PDT 2013
On Wed, Jul 17, 2013 at 09:13:44PM +0200, Rob T wrote:
> On Wednesday, 17 July 2013 at 18:47:47 UTC, Martin Nowak wrote:
> >On 07/17/2013 01:06 AM, Rob T wrote:
> >>A colleague of mine who has started coding in D sent me an email to
> >>say how impressed he is by the spell checker in the compiler.
> >>
> >>I've been making frequent use out of the spell checker too, and
> >>appreciate this incredibly simple innovation.
> >>
> >Yeah it's really helpful from time to time.
> >
> >There was a simple idea to reduce the number of false proposals.
> >Namely reducing the Levenshtein distance and the search scope for
> >short variable names.
>
> What really needs improving are the occasional cryptic and unhelpful
> compiler error messages. DMD is not alone with this problem, so I'm
> not saying DMD is especially bad among compilers, but no doubt this is
> an area that can be substantially improved and would be appreciated
> greatly.
+1.
One especially frustrating instance of this is when DMD gags errors
inside signature constraints (which I posted about recently): a small
typo in opCast causes the compiler to spew out pages and pages of how no
opImpl overload was matched, with no clue whatsoever that opCast was the
culprit. The fact that writing a stub version of opCast in some test
code (in an attempt to localize the problem) works, but copy-n-pasting
the real code in its place it mysteriously refuses to match the right
opImpl overload again, only made it even more frustrating.
In the end, I learned the real cause of the problem only by writing a
unittest that explicitly invoked opCast. Only then did I get a *real*
error message out of the compiler that described what had gone wrong. It
felt really frustrating that after all this detective work, the only
thing that came out at the end was a syntax error. It begs the question
of why, if it's a *syntax* error, couldn't the compiler have complained
about it up front.
T
--
Many open minds should be closed for repairs. -- K5 user
More information about the Digitalmars-d
mailing list