Version française
Home     About     Download     Resources     Contact us    
Browse thread
let ... in layout
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Julian Assange <proff@i...>
Subject: Re: let ... in layout
Jean-Yves Moyen <Jean-Yves.Moyen@loria.fr> writes:

> let f a b c=
>   match a,b,c with
>     ...
> 
> which allows you to match several arguments at once.

Sure, but

let f a b c =
   match a,b,c with
        0,1,2 -> 3

is a lot more cluttered than

f 0 1 2 = 3

This wouldn't really be an issue except that pattern matching is so
common. Intuitive brevity (as opposed to the brevity represented by
languages such as perl) is what makes both haskell and *ml so
readable. While both functions seem equally readable because they are
both small, once you have a screen full of them there is a significant
difference in clarity.

Cheers,
Julian.