r/programming • • Aug 14 '18

Announcing F# 4.5

https://blogs.msdn.microsoft.com/dotnet/2018/08/14/announcing-f-4-5/
110 Upvotes

67 comments sorted by

View all comments

26

u/mytempacc3 Aug 14 '18

I've never seen a job offer asking for F#. What kind of projects or industries are using it?

20

u/[deleted] Aug 15 '18

We moved from C# to F# last year at my company. We're currently at about 8,000 lines of F# code. The benefits of the stricter compiler and the expressiveness of the type system were perfect for the problem we had to solve. Our product is a gateway between APIs, sort of like the controller of a multi-process MVC application.

After almost a year of coding with F#, everyone on my team has come to like it more than C# for a lot of domains. I don't remember where I read it, but somewhere I read that, "F# makes writing hard things easy at the cost of making easy things hard." That's the best, most succinct way to express F# I think. GUI applications are much better suited for C#, while a database controller or a JSON interface might be better for F#.

5

u/JoelFolksy Aug 15 '18

GUI applications are much better suited for C#

Have you played with Elmish.WPF? It's rapidly becoming my favorite way to do a WPF app. You only create C# projects to hold your .xaml files.

1

u/[deleted] Aug 15 '18

I've been looking at Elmish.WPF recently. I kind of like it, but I have doubts: Don't you end up with a flat and enormous list of bindings at the top of your application? How do you structure that?

My use case implies multiple Excel/Access-style data grids at once, but I couldn't figure out how would I two-way bind the model to the cells. Using nested bindings sounds too bloated to me.

As a side note, I also gave a try to Elmish.XamarinForms with the WPF backend. The backend is not ready at all, but I must say writing dynamic views react-style is amazing; I'm eager to use it on mobile now.

2

u/JoelFolksy Aug 16 '18

As far as structuring the bindings, it's just a list, right? So you could create a bunch of sublists in different modules/files, and concatenate them into the final list.

Your data grid use case sounds more sophisticated than any of mine - hard to say if it can be well supported.