Re: Im getting frustrated and angry!
- From: Tor Iver Wilhelmsen <jadedgamer@xxxxxxxxxxx>
- Date: 15 Aug 2005 16:40:59 +0200
Dale King <DaleWKing@xxxxxxxxxxxxxxxxxxxx> writes:
> The dependencies in C always look like this:
>
> foo.o ----> foo.c ----> header files
Yes, prior to linking, they are that simple. Javac, however, resolves
the "link relationships" at compile time.
> Java is not that simple. First one source file can produce more than
> one class file.
Yes, but in a deterministic location.
> Secondly, compilation does not depend on text header
> files, but on other class files.
Correct: The horrid header files, an artifact of when disk space was
scarce, were abandoned when they made Java.
> Thirdly, Java allows circular dependencies which can only be
> resolved by compiling the source files at the same time.
Only if the "object files" (.class files) don't exist at compile time.
Again, this is a direct consequence of the C compiler leaving much of
what javac does to the later linking step.
And you forgot to complain about the dynamic dependencies made
possible by Class.forName() and the like.
> Those rules are incompatible with make's DAG.
So make is unsuited for Java. We get that. But why the attack on Ant?
> They have their own compiler from which they extract the necessary
> dependencies.
Yes, they compile everything "at once" and references the compiled
state. Other IDEs do things close to that, e.g. JBuilder.
> In other words, if you are willing to sacrificed correctness of
> builds and efficiency of builds then it has some nice window
> dressing to make expressing those inefficent, incorrect builds.
Ant, just like make, depends on the "makefile" author to express what
sourcefiles they want built. How can a tool be blamed for the errors
of its users?
Do you have a definition of this "correctness of builds" your whole
argument seems to rest on?
> Believe me that is not a fun world to develop in. I get a little
> skeptical of people telling me that build correctness and build
> efficiency are not that important.
I find it very efficient. And correct, in the sense it does what the
developer tells it to do.
> Dependencies are always there in building programs. You can't just
> assert your bias against C/C++ development and assume that it all
> was because of stupid people.
Not stupid people, stupid technology. Objective-C tried to fix the
most glaring problem with header files - multiple inclusion - by
adding #import, but by then the workaround of using
#ifndef __SOMETHING__
#define __SOMETHING__
....
#endif
had been established as a common practice.
> Java didn't get rid of dependencies, it just moved those
> dependencies from being dependent only on source files to being
> dependent on the output of the compilation for other source files.
As is C/C++ when it comes to link time.
> That leads to circular dependencies that can only be solved by the
> fact that Java can sort it out if the files are compiled at the same
> time.
But if c/c++ does not have circular dependencies between files, why
does make have checks against them?
> No make was created to ensure efficent builds that were also
> correct. A correctly written makefile can guarantee that.
It depends on the user just as much as Ant, then.
> - No circular dependencies. Make uses a directed *acyclic* graph.
Make still has code to detect circular dependencies.
> Dependencies in Java are routinely cyclic. Dependencies in C/C++ are
> never cyclic.
Dependencies between make targets can be.
> - Artifacts can be built independent of each other. There are cases
> in Java where you cannot compile A.java and B.java separately.
Because javac does "link-time lookups" when compiling. You avoid this
problem in your praise of make.
> You have to compile them at the same time. In C/C++ you can always
> compile separately.
Only if you compile to (intermediate) object files.
> - One set of commands produces one output. Make has some support for
> this but only in pattern rules. Compiling one Java source file can
> produce many class files.
Yes, this is a consequence of the language. NOT ANT! If I use Ant to
build Python projects, it seems half your arguments go away?
> Make is an expert system. You give it the rules and it applies the
> rules.
Why, it's the same thing as Ant does then. Only it doesn't run
command-line programs like a batch file would - that is make's way.
.
- Follow-Ups:
- Re: Im getting frustrated and angry!
- From: Dale King
- Re: Im getting frustrated and angry!
- References:
- Re: Im getting frustrated and angry!
- From: Stefan Schulz
- Re: Im getting frustrated and angry!
- From: Dale King
- Re: Im getting frustrated and angry!
- From: Tor Iver Wilhelmsen
- Re: Im getting frustrated and angry!
- From: Dale King
- Re: Im getting frustrated and angry!
- From: Tor Iver Wilhelmsen
- Re: Im getting frustrated and angry!
- From: Dale King
- Re: Im getting frustrated and angry!
- From: Tor Iver Wilhelmsen
- Re: Im getting frustrated and angry!
- From: Dale King
- Re: Im getting frustrated and angry!
- Prev by Date: Re: importing external package into applet..
- Next by Date: Re: importing external package into applet..
- Previous by thread: Re: Im getting frustrated and angry!
- Next by thread: Re: Im getting frustrated and angry!
- Index(es):
Relevant Pages
|