On Mon, Sep 22, 2008 at 6:27 PM, Brian Hurt <[EMAIL PROTECTED]> wrote: > > > On Sun, 21 Sep 2008, wren ng thornton wrote: > >> Even with functionalists ---of the OCaml and SML ilk--- this use of spaces >> can be confusing if noone explains that function application binds tighter >> than all operators. > > Bwuh? Ocaml programmers certainly know that application binds tighter than > operators. And as: > > let f x y = ... in > f a b > > is more efficient (in Ocaml) than: > > let f (x, y) = ... in > f (a, b) > > (Ocaml doesn't optimize away the tuple allocation), the former > (Haskell-like) is generally preferred by Ocaml programmers.
That's odd. My experience from trying to learn ocaml at one point was that the tuple notation is preferable because you can do pattern matching on every value in the tuple whereas with the other one you can match on either the first or second parameter but not both without nesting ocaml's version of 'case ... of' (match ... with?). One of the things I really like about Haskell syntax is that you can pattern match on any number of parameters without having to nest 'case ... of' expressions. Jason _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe