Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

They really diverge when it comes to more advanced language features. I make heavy use of functors in my code and my (possibly mistaken) understanding is that F# simply doesn't support them. Ditto for first-class modules, polymorphic variants, GADTs, and OCaml's object system. Of course, in exchange for a wimpier core, F# gives you a lot of convenient polish and proper support for parallelism & concurrency.


Mauricio Scheffer has written several articles about applicative functors in F# http://bugsquash.blogspot.com/search/label/applicative%20fun... To tell the truth I don't really get it, but maybe you do.


ML functors aren't the same thing as the functors or applicative functors I often blog about. Difference explained here: http://stackoverflow.com/questions/2030863/in-functional-pro... ML functors are like parameterized modules. F# doesn't have parameterized modules, but has parameterized classes, which work quite similarly. Classes/objects can also be used as first-class modules. What .NET lacks (therefore also F#) is type constructor abstraction, which means you can't generically express the concept of a (Haskell) functor, applicative functor, monad, etc.


My understanding is the same. I, like you, haven't followed F# since it diverged so much in development, but it's understandable that those features would be in-commensurable with how it interoperates with the .NET framework.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: