linker wrapper

Andrew Wiley debio264 at gmail.com
Sat Nov 13 17:06:11 PST 2010


On Sat, Nov 13, 2010 at 5:02 PM, bearophile <bearophileHUGS at lycos.com>wrote:

> Walter Bright:
>
> > bearophile wrote:
> > > A new fresh trouble, I think I have already seen about 10-15 persons
> ask this question in D.learn:
> > >
> http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=22772
> >
> >
> http://www.digitalmars.com/ctg/OptlinkErrorMessages.html#symbol_undefined
>
> 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).
>
> 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.
>
>
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20101113/cf0a96b2/attachment.html>


More information about the Digitalmars-d mailing list