Re:“A closure is a poor man’s object; an object is a poor ma...
by noblethrasher on Monday May 01, 2017 @12:01AM
(#14235485)
F# also has object expressions that are just as syntactically convenient as closures.
[ Parent
| on HN ]
Re:“A closure is a poor man’s object; an object is a poor ma...
by saghm on Monday May 01, 2017 @12:18AM
(#14235548)
From what little I know of F#, it seems a lot like OCaml (as in, I don't know enough to know of any differences, other than that F# is a .NET language). From what slightly more I know about OCaml, objects are there, but almost nobody uses them and everyone pretends that they're not in the language. Is F# similar in this regard, or are objects considered fair game?
Re:“A closure is a poor man’s object; an object is a poor ma...
by noblethrasher on Monday May 01, 2017 @12:31AM
(#14235584)
Idiomatic F# code does tend to use pattern matching more than ad-hoc polymorphism, but objects are still very much considered fair game since the major value proposition of the language is its ability to leverage the .NET ecosystem.