tooling quality and some random rant

Steven Schveighoffer schveiguy at yahoo.com
Mon Feb 14 12:03:01 PST 2011


On Mon, 14 Feb 2011 14:24:05 -0500, Andrej Mitrovic  
<andrej.mitrovich at gmail.com> wrote:

> I think this void main() issue is blown out of proportion. They'll see
> the error message once, and they won't know what it means. Ok.
>
> But the second time, they'll know. No start address == no main. Maybe
> the linker should just add another line saying that you might be
> missing main, and that's it.
>
> You guys want to rewrite the compiler for this one silly issue, come on!

No, not at all (at least for me).  I'm just pointing out that the error  
that occurs when main is missing (probably one of the more common linker  
errors) is far more confusing in D than it is in C++.

That doesn't mean D is unusable, or Walter should drop everything and fix  
this problem, or that C++ is better.  It's just an observation.

I think linker errors in general are one of those things that few people  
understand, and most cope with just pattern recognition "Oh, I see  
_deh_start, probably forgot main()" with no regards to logic. :)  "Fixing"  
the linker so it suggests the right thing is likely impossible because the  
linker doesn't know where everything is or what one must include in order  
to satisfy it.

That being said, fixing the linker so it demangles symbols would make the  
errors 10x easier to understand.

-Steve


More information about the Digitalmars-d mailing list