4 ms·
> BP is PP plus what's required to make it more than a toy And in fact OCaml does have BP, as was explained earlier, just with a heavier syntax. > effective i
by yawaramin 4y ago
> BP is PP plus what's required to make it more than a toy
And in fact OCaml does have BP, as was explained earlier, just with a heavier syntax.
> effective inability to use point-free style
OK but point-free style is not an end in itself, it's just a means to an end (clean code), and there's certainly no universal agreement that it's the best means...explicit style is almost always easier to understand for a wide assortment of people and doesn't require mental backflips trying to figure out the weird heiroglyphics of '(.) (.) (.)' etc. etc.
> Huge limitation for polymorphic ocaml code.
Yeah I can see how writing e.g.
let f x = g [] x
As opposed to
let f = g []
Is such a deal-breaker. /s
- wyager 4y ago> just with a heavier syntax. Ok, I'm glad we agree on that. > I can see how writing Eta reduction is one example, but a great deal of code is cleanly expressed as e.g. vecLen = sum . map (^2) And ocaml's type system is not capable of handling this gracefully. Very unfortunate!
- yawaramin 4y ago? let vec_len vec = vec |> map (fun x -> x ** 2.) |> sum Or even let square x = x ** 2. let vec_len vec = vec |> map square |> sum Honestly, if code like this is the biggest nitpick, I have a hard time taking the argument seriously.