logoalt Hacker News

redrobeinyesterday at 11:29 PM2 repliesview on HN

F# is a good language, but I feel like it's forever stuck in C#'s shadow. A lot of the library code is C# and .NET handmedowns. Not interfaces or libraries crafted with F# in mind, often having no explicit documentation for use with F# either.


Replies

omcnoetoday at 8:19 AM

Yeah there is some degree of awkwardness created by the interaction, but I think it’s less about needing specific libraries to map well and more about getting a good understanding of what the interop rules are, and what the shape of the underlying generated output actually looks like.

C# interoperability loosens guarantees (particularly immutability) that F# code normally relies on. There are surprising limits that come up in generics because of how they map to C#.

rienbdjtoday at 7:42 AM

Translating library usage from C# to F# is pretty mechanical so not sure if specific docs are needed.

The larger issue is the C# community loves OOP so you often have to wrap these libraries into something more “FP” if that’s how you want to work.

Overall it’s far better than having nothing (looking at Haskell, OCaml as much as I enjoy them!)

show 1 reply