[Haskell-cafe] Non-technical Haskell question

Ben Rudiak-Gould Benjamin.Rudiak-Gould at cl.cam.ac.uk
Mon Dec 6 13:13:04 EST 2004

azrael at demonlords.net wrote:

 >When I use javac every file that is created is necessary for the
 >application to run. This can't be said of the ghc compiler. Having an
 >excuse that this is way the C compiler does it or that this is the way
 >its always been done is to poor of a reason to even argue against. If a
 >file isn't needed then it shouldn't be left there.
 >Does this bother me? Not in particular, its just an indication that this
 >is an old design.

As Mark Carroll said, the .o and .hi files are there to support separate 
compilation. GHC supports separate compilation because it's useful. 
Believe me, Haskell is the last language to do something just because 
everyone else does it. :-)

The javac approach isn't better, just different. If the next version of 
GHC could produce portable bytecode files, that would be a good thing 
(except that it would make GHC even more complicated than it already 
is). If the next version of GHC could *only* produce portable bytecode 
files, that would be a bad thing, since it would lose functionality 
(while gaining other functionality).

Your newer-is-better premise makes little sense. Haskell is a far 
"newer" language than Java; many aspects of Haskell's design are no 
older than Haskell, while nearly all aspects of Java's design have been 
around in other languages for decades. You might as well be arguing that 
Java is better because it's based on older, proven technology. Better 
yet, suppress the urge to compare Haskell and Java at all; after all, 
the more different they are, the more worthwhile it is to learn both! 
Once you're reasonably adept at programming in different languages, then 
you can start thinking about ways to combine the advantages of each.

-- Ben

More information about the Haskell-Cafe mailing list