What Makes A Programming Language Good

Adam Ruppe destructionator at gmail.com
Wed Jan 19 05:51:21 PST 2011


Jim wrote:
> I never claimed that file storage was an optimisation. The compiler
> can optimise better by seeing more source code (or a greater AST if
> you will) at compile time. Inlining, for example, can only occur
> within a compilation unit. I'm arguing that a file is not the optimal
> compilation unit. Computers today have enough memory to hold the
> entire program in memory while doing the compilation. It should be up
> to the compiler to make the best of it.

Note that dmd already does this, if you pass all the files on
the command line at once.

My new build.d program fetches the dependency list from dmd, then
compiles by passing them all at once  - it's a really simple
program, just adding the dependencies onto the end of the command
line (and trying to download them if they don't exist).
So then you wouldn't have to do it manually either.


More information about the Digitalmars-d mailing list