<p>Although I agree that sources and objects should be sperated there are some benifits.  All tools know where to look for the objects.  And is not dificult to keep out of scm.  A great example of this is Haskell.  To compile an app you only need to specify the main file and it finds all the included modules, only recompiling if nessary.  And if I remember correctly it also spits out a "definition list" type file that is great for things like code completion.</p>

<div class="gmail_quote">On Feb 22, 2012 7:15 PM, "Jonathan M Davis" <<a href="mailto:jmdavisProg@gmx.com">jmdavisProg@gmx.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wednesday, February 22, 2012 16:08:20 H. S. Teoh wrote:<br>
> On Wed, Feb 22, 2012 at 05:05:40PM -0500, Jonathan M Davis wrote:<br>
> > On Wednesday, February 22, 2012 22:33:35 Bernard Helyer wrote:<br>
> > > A discussion on the Mono-D IRC channel just made me realise<br>
> > > something.<br>
> > ><br>
> > > dmd -c foo/a.d bar/a.d<br>
> > ><br>
> > > The second module overwrites the first. This makes using 'pass<br>
> > > everything at once' with Mono-D (IDE plugin) difficult/impossible.<br>
> > > As far as I'm concerned, it's just a bug that's never come up. The<br>
> > > solution is trivial, of course. Prepend package names so you get<br>
> > > foo_a.o and bar_a.o. Either that or allow specific output paths to<br>
> > > be specified per-object.<br>
><br>
> [...]<br>
><br>
> The real solution is that when creating object files, dmd should put the<br>
> .o files in the modules' respective subdirectories. I.e., it should keep<br>
> the pathname component of every source file and use that for the object<br>
> file. Then you have a 1-to-1 mapping between source files and object<br>
> files.<br>
<br>
Yuck. Yuck. Source should _always_ be separated from object files. It's<br>
incredibly messy otherwise.<br>
<br>
> Either that, or duplicate the source tree structure in an object tree<br>
> (if you like that kind of compile structure -- some projects do that).<br>
<br>
That's definitely the way to organize things.<br>
<br>
- Jonathan M Davis<br>
</blockquote></div>