Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2000-03-17 (09:03)
From: Julian Assange <proff@i...>
Subject: Re: let ... in layout
Jean-Yves Moyen <> 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.