Re: Why doesn't C# allow incremental compilation like Java?
- From: Andy <andyj@xxxxxxxxxxxxxxxxxx>
- Date: 24 Apr 2007 05:51:50 -0700
On Apr 23, 2:27 am, Jon Skeet [C# MVP] <s...@xxxxxxxxx> wrote:
I find it hard to believe that build time should really be a problem.
I find it a problem - at least compared with using Eclipse in Java.
That builds every time you save, and has a sufficiently nippy
incremental compiler that it encourages you to save (and therefore
compile) often. I find this very helpful compared with the VS model,
where you can't build as often because the build takes significantly
longer. (Even if it's only 15 seconds, that's reasonably significant.)
I think you're in a minority then. Personally, I'm not compiling
after every single change I make to a single file. I work in multiple
files to get a unit of work done, and compile that. Even still, my
library assemblies don't take anywhere near 15 seconds, although my UI
assembly with lots of forms takes about that long..
Part of that is due to assemblies being single files (which is
brilliant in many other ways) but I suspect VS could still do a better
job at incremental compilation. It would probably have to have its own
compiler (just as VS does for Java) which makes life trickier though. I
occasionally run into problems where Eclipse's internal compiler is
pickier than the JDK or vice versa.
VS assumes you want to build the entire project. There really isn't
much of a point in building a single file; you can't do anything with
the result of that, except to link it either other modules to form the
assembly. VS 2005 doesn't suffer the problems you mention for
esclipse, because it uses the same compiler that you would outside the
IDE (MSbuild, which in turn uses csc). Assemblies in .Net don't
contain self contained classes; usually the classes depend on each
other, and i imagine that's the case in java as well.
If you want maximum control over the build, then use NAnt.
That doesn't help the development time though.
Then stop compiling every change to a file. Why would you even bother
recompiling after putting some whitespace into a comment?
.
- Follow-Ups:
- Re: Why doesn't C# allow incremental compilation like Java?
- From: Jon Skeet [C# MVP]
- Re: Why doesn't C# allow incremental compilation like Java?
- References:
- Why doesn't C# allow incremental compilation like Java?
- From: mwelsh1118
- Re: Why doesn't C# allow incremental compilation like Java?
- From: Nicholas Paldino [.NET/C# MVP]
- Re: Why doesn't C# allow incremental compilation like Java?
- From: mwelsh1118
- Re: Why doesn't C# allow incremental compilation like Java?
- From: Arne Vajhøj
- Re: Why doesn't C# allow incremental compilation like Java?
- From: Jon Skeet [C# MVP]
- Why doesn't C# allow incremental compilation like Java?
- Prev by Date: Re: String Encryption Help
- Next by Date: Re: ApplicationException unhandled by user code
- Previous by thread: Re: Why doesn't C# allow incremental compilation like Java?
- Next by thread: Re: Why doesn't C# allow incremental compilation like Java?
- Index(es):
Relevant Pages
|