Re: Why doesn't C# allow incremental compilation like Java?



Am 19 Apr 2007 17:08:03 -0700 schrieb mwelsh1118@xxxxxxxxx:

Why doesn't C# allow incremental compilation like Java?

Specifically, in Java I can compile single .java files in isolation.
The resulting individual .class files can be grouped into .jar files.

And then? At runtime, everything has to be linked together, which uses more
time than compiling the while C#-program .... what do you gain?

IMO it is no good way to use files as containers for modules. .NET allows
physical allocation of sourcecode (files) and logical allocation
(namespaces, assemblies).

If you want it the Java-way, you can. Simply compile your files to modules,
(/target:module) and link them later. Note that AFAIK VS does not have
project settings to do that, you have to use command line.


[snip]

This has serious drawbacks in terms of compilation. With Eclipse, I
change a file and only that file is re-compiled. With Visual Studio, I
change a file and have to manually re-compile, which may take 10+
seconds for large projects (even if all I did was add a space to a
comment).

10 seconds? How many lines do you have in your compilation unit?

My 2 cents...
Paule
.



Relevant Pages

  • Re: NetBeans and JCreator
    ... It just simple does not give me the option to compile or run the .java file. ... I can run the .class file from command line fine. ... NetBeans and he can compile/run my .java code. ... NetBeans generally does not have trouble with .java files that come from ...
    (comp.lang.java.programmer)
  • Ant Help
    ... Java source files to compile. ... Only Java files that have no ... How can we make Ant to compile only the source file in that have ...
    (comp.lang.java.programmer)
  • compile -- permission denied
    ... I was trying to compile my java files and got the message below. ... $ sudo javac Main.java ... Prev by Date: ...
    (comp.lang.java.help)
  • compile -- permission denied
    ... I was trying to compile my java files and got the message below. ... $ sudo javac Main.java ... Prev by Date: ...
    (comp.lang.java.help)
  • Re: NetBeans and JCreator
    ... I have a Window Application program that I wrote using JCreator Pro 4.0. ... However, when I open the file in NetBeans, I don't have any way to compile/run the .java file. ... So if your program won't compile or run, there is a specific problem not related to whether "NetBeans just doesn't accept .java files", because it does. ...
    (comp.lang.java.programmer)

Loading