From: Nat Pryce Date: 2002-08-28T03:34:56+09:00 Subject: Re: What New Language After Ruby? On Tue, 2002-08-27 at 19:22, William Djaja Tjokroaminata wrote: > Based on the comparison example, is it true that in general Haskell code > is relatively shorter than Scheme code? Probably this shorter syntax > gives Haskell an advantage (something that I really appreciate knowing > how faster I can program in Ruby compared to programming in C). Function definitions are probably more concise in Haskell than in Scheme. Haskell needs some type declarations, which Scheme doesn't, but Haskell also infers types as much as it can, and so many functions do not require explicit type declarations. > > This example is pretty simple, but the advantages of currying are most > > apparent when using higher order functions. E.g. compare: > > > define (double a-list) (map (lambda (x) (* x 2)) a-list)) > > > to: > > > double a_list = map (* 2) a_list Come to think of it, currying can be used to declare this yet more concisely: double = map (* 2) -- Dr. Nathaniel Pryce, Technical Director, B13media Ltd. Studio 3a, 22-24 Highbury Grove, London N5 2EA, UK http://www.b13media.com