Tomasz Zielonka wrote:
On Sun, Feb 05, 2006 at 01:10:24PM -0000, Brian Hulley wrote:
2) Use "," instead of ";" in the block syntax so that all brace
blocks can be replaced by layout if desired (including record blocks)
Wouldn't it be better to use ; instead of , also for record syntax?
I thought of this also, but the nice thing about using commas everywhere is
that it is consistent with tuples and lists:
[a,b,c]
(a,b,c)
{a,b,c}
I admit it takes some getting used to to write:
map f (h;t) = f h;map f t
but you couldn't use commas in tuple syntax if they were also used as list
cons.
Also, I'm using
test :{Eq a, Show a} a -> ()
instead of
test :: (Eq a, Show a) => a->()
and the comma here is particularly nice because it suggests a set, which is
exactly what the context is.
Regards, Brian.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe