Re[6]: [Haskell-cafe] #haskell works

2007-12-15 Thread Bulat Ziganshin
Hello Tim,

Saturday, December 15, 2007, 5:35:03 PM, you wrote:

 the inliner can do the job of inlining (a fixed number of) iterations
 of a recursive function -- I don't know if it does this now, but it
 would be easy to implement.

 It may be that GHC *doesn't* inline tail-recursive functions, but as I
 pointed out above (which I'm just getting directly from the paper), it
 would be easy

i see your point - it's easy to implement everything in GHC. probably
its authors was sleeping last 15 years :)

 as above, loop unrolling turns out to be just a special case of
 inlining.

and ghc was so genuine that it was implemented general case without
implementing special one :)

 That's not true in C. The simplicity of Haskell (or rather,
 Core) means it's easy to implement a lot of things with a great deal
 of generality, an advantage that gcc doesn't have.

Core language has the same complexity for generating good code as C, C-- or LLVM

 Or, I mean, feel free to insist things are impossible, but try not to
 stand in the way of the people who are doing them while you say so.
 :-)

you may believe in what you want. i prefer to say about real
situation. if it will be possible to quickly write good Haskell
compiler, it was be written many years ago

-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: Re[6]: [Haskell-cafe] #haskell works

2007-12-15 Thread Tim Chevalier
On 12/15/07, Bulat Ziganshin [EMAIL PROTECTED] wrote:
 i see your point - it's easy to implement everything in GHC. probably
 its authors was sleeping last 15 years :)


As you well know, implementing things in GHC isn't always easy for
people who aren't named Simon, and people who are named Simon are
often busy not so much with sleeping as with coming up with things
that will lead to new papers rather than implementing straightforward
things that are already pointed out in existing papers :-) (I know
it's dangerous to call optimzations straightforward before you try
to implement them, but even so.)

 and ghc was so genuine that it was implemented general case without
 implementing special one :)


Isn't implementing the general case and leaving the users to use it to
implement the special ones what functional programming is about? :-)

  That's not true in C. The simplicity of Haskell (or rather,
  Core) means it's easy to implement a lot of things with a great deal
  of generality, an advantage that gcc doesn't have.

 Core language has the same complexity for generating good code as C, C-- or 
 LLVM


Sorry, I don't know what you mean here; I assume by complexity you
don't mean time complexity or space complexity, and anyway, I
don't know what those would mean as applied to a programming language.
Care to elaborate?

 you may believe in what you want. i prefer to say about real
 situation. if it will be possible to quickly write good Haskell
 compiler, it was be written many years ago


As others have pointed out, I think that's false. Resources, financial
and human, have been thrown at C compilation that have not been thrown
at Haskell compilers. As hard-working as the people who work on
Haskell compilers are, there aren't very many of them and none of them
have writing Haskell compilers as a job description.

Cheers,
Tim

-- 
Tim Chevalier * catamorphism.org * Often in error, never in doubt
The blues isn't about feeling better, it's about making other people
feel worse, and making a few bucks while you're at it.  -- Bleeding
Gums Murphy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe