This is actually the reason behind why dmd will create a single object file when given multiple source files on the command line. It's also why dmd can create a library directly. I've toyed with the idea of generating an executable directly many times.