Improving Compiler Error Messages

Nathan Tuggy bugzilla at nathan.tuggycomputer.com
Sat May 1 21:53:03 PDT 2010


On 2010-05-01 21:31, Ary Borenszweig wrote:
> Ary Borenszweig wrote:
>> Walter Bright wrote:
>>> http://www.drdobbs.com/blog/archives/2010/05/improving_compi.html
>>>
>>> The next dmd update is getting the fruits of this.
>>
>> So cool!
>>
>> About the semicolon redundancy: it has been discussed a lot of times
>> in this newsgroup, but I started programming in ruby some time ago and
>> I can tell you I prefer to not type thousands of those redundant
>> semicolons to once in a while spend 5 or 10 seconds to understand that
>> the error the interpreter is talking about is about a
>> misinterpretation of what I wrote. Note that this "once in a while"
>> might have happened two or three times in about seven months of work.
>> I prefer not to type those many semicolons and parenthesis. :-)
>
> And
>
> 3. scan till a ; is found
>
> can be replaced with
>
> 3. scan (in a smart way) till a line end is found

Yeah, I kind of thought that myself. It works especially well in 
languages without implicit line continuation (BASIC derivatives, mostly, 
and probably some others I'm not thinking of right now). Obviously, D 
does have implicit line continuation, which causes potential ambiguity, 
but I think it can still work fairly well.

Anyone done experiments on the effectiveness of this approach in 
C-family languages?
-- 
~ "The most likely way for the world to be destroyed, most experts 
agree, is by accident. That's where we come in; we're computer 
professionals. We cause accidents." Nathaniel Borenstein (1957 - ) ~ 
http://tagzilla.mozdev.org v0.066



More information about the Digitalmars-d mailing list