<div class="gmail_quote">On Sat, Nov 13, 2010 at 5:02 PM, bearophile <span dir="ltr"><<a href="mailto:bearophileHUGS@lycos.com">bearophileHUGS@lycos.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Walter Bright:<br>
<div><div></div><div class="h5"><br>
> bearophile wrote:<br>
> > A new fresh trouble, I think I have already seen about 10-15 persons ask this question in D.learn:<br>
> > <a href="http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=22772" target="_blank">http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=22772</a><br>

><br>
> <a href="http://www.digitalmars.com/ctg/OptlinkErrorMessages.html#symbol_undefined" target="_blank">http://www.digitalmars.com/ctg/OptlinkErrorMessages.html#symbol_undefined</a><br>
<br>
</div></div>Probably we'll see more people asking for that kind of help. Not all D newbies come from languages that use a linker. Today a significant and growing percentage of newbie D programmers come from Java, C#, JavaScript, Python, etc. The linker is currently present in the D world, and you can't hide this fact (but simpler to understand error messages will probably help a lot).<br>

<br>
My preferred (partial) solution to that problem is to let DMD look by itself for the modules it needs to compile a program, unless a compiler switch asks otherwise and restores the simpler basic behaviour. This helps D newbies, people that write small programs, and causes exactly zero troubles to people that compile large D programs or people that want partial compilation anyway. This doesn't solve all linker troubles, because linker errors may have other causes, but removes the most common one for D newbies and is useful for other purposes too.<br>

<font color="#888888"><br></font></blockquote><div><br></div><div>I would argue that while helpful error messages are... helpful, but having the compiler or linker change what you said to what it thinks you meant seems likely to cause unintended behavior and become a crutch. Learning to operate a compiler and linker is a fundamental part of programming pretty much any compiled language, and taking it away encourages the user to not care how their code becomes an executable. To me, this seems like a large disservice.</div>
</div><br>