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
[Caml-list] variant with tuple arg in pattern match?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-04-09 (06:23)
From: Mattias Waldau <mattias.waldau@a...>
Subject: RE: [Caml-list] variant with tuple arg in pattern match?
> I would suggest the other way round: as we already did for functions,
> we should prefer the curried syntax for constructors.

What do you really mean by "curried syntax", do you mean that you can
"add" one argument at a time to a function call?

If so, I don't think that curried syntax is something good. I don't
why "curried" calls couldn't be annotated.

If I for example add an argument to a function and forget to update
all callers, I won't get an error where the call is done, but where the
result of the call is used. I won't errors at the correct location.

Since 99% of my calls are non-curried, Ocaml points me to the incorrect
location in 99% of the cases.

Why can't curried calls be annotated? This would improve error-detection!

And of course, I don't want this misfeature to spread anymore.


To unsubscribe, mail  Archives: