Browse thread
[Caml-list] variant with tuple arg in pattern match?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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 understand 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. /mattias ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr