Here is one fellow’s feedback on OCaml.
It is balanced and seems useful, especially given that he links to his philosophy on languages, which appears to be a healthy one.
This “feedback” is quite old and out of date.
“No stack trace for natively compiled executables” -> false since ocaml 3.11
“List.map is not tail-recursive!” -> but List.rev_map is. OCaml designer made a choice about this: if you make List.map tail recursive it will imply a List.rev and a double allocation of the list. This costs memory…
“Arithmetic’s readability” give a try to pa-do
All in all, a lot of things in this feedback has changed since it was written. I think you should avoid relying on it. To my mind this is really a matter of taste…
“you cannot easily modify the behavior of a module outside of it”
That’s not entirely true: if you link against the module name the linkage is static (and thus immutable). If you parameterize the name of the module (via a functor) then yes, you can modify a module:
module MyTime = struct
let date_of_string s =
if is_iso8601 s
then date_of_iso8601 s
else Time.date_of_string s
I wouldn’t simply dismiss it and say it’s old and out of date.
A lot of things he says are still pertinent (especially the thing about macros that nobody seems to understand among caml developers, everybody is praising the horror that camlp4 is)
But still, I think it helps to try to divide his comments into the following categories.
1) comments that are out of date.
2) comments that are about taste or design choices.
3) comments that are the consequence of not having the same tastes.
4) comments that are relevant.
P.S. Regarding arithmetic readability you can also wait on ocaml 3.12 and make judicious use the let open in construct.
Regarding List.map, OCaml Street uses a different strategy in their Core library: http://ocaml.janestreet.com/?q=node/71
Your classifications sound helpful.
For new OCamlers who have surely also read that page; it might be nice to see a current response.
(Thanks all for your responses here, too)
[...] This post was mentioned on Twitter by Planet Scheme. Planet Scheme said: Grant Rettke: Someone’s feedback on OCaml http://bit.ly/cs1EO4 [...]
Notify me of followup comments via e-mail. You can also subscribe without commenting.