gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Re: darcs vs tla


From: Andrew Suffield
Subject: Re: [Gnu-arch-users] Re: darcs vs tla
Date: Wed, 10 Nov 2004 20:40:49 +0000
User-agent: Mutt/1.5.6+20040907i

On Tue, Nov 09, 2004 at 10:21:51AM +0000, Catalin Marinas wrote:
> On Mon, 2004-11-08 at 23:20, Dustin Sallings wrote:
> > > A second problem I think is Haskell. Not so many people can help with
> > > coding and it is also much slower than C or C++. The today's compilers
> > > are not smart enough to optimally deal with pure functional
> > > languages.
> > 
> >     This is clearly wrong.   Haskell was the #1 reason that pointed me in 
> > the direction of darcs (and no, I didn't know very much of it at the 
> > time).  I greatly support projects creating software in higher level 
> > languages instead of holding so fast to the belief that it'll be slow 
> > if they do it in anything other than C.
> 
> I don't have any experience with Haskell but, from the comments of the
> 2004's ICFP contest comments, it seems to be much slower than the
> equivalent C++ code (equivalent meaning achieving the same result, not
> trying to write C++ code in Haskell).

This is subjective and mostly wrong.

In simple terms, here's what's really going on there:

The C++ programmers were better at C++ than the Haskell programmers
were at Haskell.

Haskell is 'easy' to learn, but it's not massively easier to use than
any other language. Writing efficient code in Haskell is precisely as
hard as writing efficient code in any other language. Programmers who
are capable of writing efficient code are rare. Programmers who think
they are capable of writing efficient code are not rare.

That said, Haskell is slower than equivalent C++ code. It's just not
what was going on there.

> >     I write a lot of code in OCaml (not purely functional, though most of 
> > my code is), and I can assure you *that* compiler optimizes very well 
> > compared to gcc.  It does not seem intuitive to me that a low-level 
> > compiler such as C could optimize better than a high level compiler 
> > such as that of ghc, ocaml, eiffel, etc...  
> 
> [I think this gets OT] In C, the main optimiser is the programmer, not
> the compiler.

This is true in every language with a compiler that doesn't suck since
about 1995.

(ocaml is not appreciably better than gcc. It is easier to find a
crappy C programmer than it is to find a crappy ocaml programmer. If
you find an ocaml programmer then you've probably got one)

> I also agree that programs look much nicer and easier to
> write in a high level language.

This is also a feature of programmers, not languages.

> One other thing I like in darcs is the possibility of cherry-picking
> changes from any related repository because a merge operation doesn't
> lose individual changesets. Arch generates a single patch after a
> replay/commit sequence, no matter how many patches were applied.

This is a feature of users, not arch. A long time ago, Robert Collins
and I hashed out a scheme for doing this in arch; it's known as
pure-merge, and has many advantages besides this.

None of us have cared enough to make time to implement it properly
yet.

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'                          |
   `-             -><-          |

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]