Re:Why We Use OCaml
by dllthomas on Wednesday July 16, 2014 @03:31PM
(#8044006)
Of course, you can build your own closure:
IMO, the biggest downside there being how far it typically pushes the definition of that function from the call site. Small functions - a good practice anyway - ameliorates that a bit.
[ Parent
| on HN ]
you can, but it's sufficiently clunky that it simply doesn't feel like a natural thing to do in the language. good language design is a lot more about the things it makes easy and natural than the things it makes possible.
"you can, but it's sufficiently clunky that it simply doesn't feel like a natural thing to do in the language."
It does to me, but I've done enough functional programming that I easily reach for concepts from that space.
"good language design is a lot more about the things it makes easy and natural than the things it makes possible."
Of course. I don't know where you got the idea I was saying closures aren't a good thing to have language support for. I said precisely the opposite.