Is it "poor taste" to include type information in function definitions?

I had wondered:

Is it “poor taste” to include type information in function definitions?
It seems like very nice documentation, but then again, maybe it is nicer rely on the inferencing engine to reduce the amount of code?
In theory you write short, easy to understand functions; in practice it isn’t always this simple though.

People kindly replied:

When you can avoid it, it is better to NOT include type information. Using a tool like “ocamldoc” will render the function and its inferred types in a real documentation format (e.g. HTML).
There are cases where you need to include type information, but they are corner cases.

Sylvain

Interface files (.mli) are usually the main place for documentation. Within the .ml files, you can explain your algorithms but it’s usually just plain comments, not so much type annotations.

Martin

As to the matter of “taste”, note that this practice is not idiomatic in Ocaml, in contrast to Haskell where it seems current. I’m not sure if that’s your case, but people coming to Ocaml from Haskell may at first tend to exaggerate on this aspect…

Dario

Matthias Felleisen and the PLT Team win the ACM Karl Karlstrom Award

Presented annually to an outstanding educator who is: appointed to a recognized educational baccalaureate institution; recognized for advancing new teaching methodologies, or effecting new curriculum development or expansion in Computer Science and Engineering; or making a significant contribution to the educational mission of the ACM. Those who have been teaching for ten years or less will be given special consideration. A prize of $5,000 is supplied by the Prentice-Hall Publishing Company.

Via Matthias via ACM via Shriram.

Chicken: the transition to hygienic macros and a real module system is complete

With the most recent commits (4.4.4), chicken is now consistent in the way core forms are handled. There are no hard-coded special forms and everything can be redefined, reexported and modified on import. Syntax may now also expand into module forms (if at toplevel, local or nested modules are still not available and not strictly necessary).
So, the transition to hygienic macros and a real module system is hereby complete…

Felix