|
|
|
|
|
by atombender
3354 days ago
|
|
It's a lot of little random things. For example, the ~keyword: syntax, the need to paranthesize where other languages don't (e.g.: "foo -1" doesn't work, you have to do "foo (-1)"). The way argumentless functions must be declared with "function". The expression termination issue (";;") is a lot less elegant than, say, Haskell's whitespace awareness. Operators not being overloaded is annoying, although there's a valid argument for explicitness. Overall, it's not a terrible syntax, but it feels a lot like someone just invented things along the way as they needed them, without a cohesive plan. Lots of pragmatic but visually ugly choices. I also take issue with the tooling; things like error messages, or just the antiquated feel of the CLI tools. For example, having a REPL without built-in readline support (rlwrap to the rescue) in this day and age is not acceptable. |
|
Could you show an example, I don't get it?
>The expression termination issue (";;")
Strange, I've never used ";;" in my code, only in repl.
>Operators not being overloaded is annoying, although there's a valid argument for explicitness.
Overloading is harmful. It's definitely the wrong way to do ad-hoc polymorphism, and OCaml have a polymorphic comparison operators, which brought so much headache. Type classes or modular implicits are the right way to do ad-hoc. Looking forward to see modular implicits in OCaml [1].
>For example, having a REPL without built-in readline support (rlwrap to the rescue)
What do you mean by "readline" support?
[1] http://ocamllabs.io/doc/implicits.html