Live data from Hacker News

Get Started with F# as a C# developer

blogs.msdn.microsoft.com

1–10 of 60 posts

Re: Get Started with F# as a C# developer

#7
Ask HN: I've toyed around with F# and I kinda like it but I've never dug deep enough into it to answer the question: can I use this for 'real life' code as part of an existing C# desktop application for instance, e.g. build some F# into an assembly which is callable from C#? Without tons of hassle? What are good samples of real life application code in F#?

Re: Get Started with F# as a C# developer

#10
post #7

Ask HN: I've toyed around with F# and I kinda like it but I've never dug deep enough into it to answer the question: can I use this for 'real life' code as part of an existing C# desktop application for instance, e.g. build some F# into an assembly which is callable from C#? Without tons of hassle? What are good samples of real life application code in F#?

> can I use this for 'real life' code as part of an existing C# desktop application .. without tons of hassle

Yes. Your standard OOP features like inheriting from C# classes, implementing interfaces, etc are supported natively in F#. The main hassle in being C#-compatible is exposing an external OOP api with only .NET types and interfaces instead of standard F# types. This means, for example, exposing `seq` (`IEnumerable`) instead of `list` (`Microsoft.FSharp.Collections.List`) or using the struct-tuple construct in F# 4.1 so C# 7 can access it.

> good samples of real life application code

No personal recommendations but have you seen https://github.com/fsprojects/awesome-fsharp

Post reply on HN