Community-led tooling for F# in Visual Studio
blogs.msdn.com
blogs.msdn.com
For example, F# has a better ORM framework than anything in C# with Type Providers.... unless you need to support two databases in the same dll. Then when trying to use nHibernate, we found that Nhibernate mappings expect virtual properties, which F# didn't easily do. So we have a C# project with a few C# classes used by the ORM, then a conversion layer into F# domain objects, which we would've done anyway, because ORM classes are terrible at expressing the domain compared to F# records and unions.
Other than a few weirdnesses like that, we've found it to be great and otherwise a drop in replacement for C#.
I like my current job, a LOT, but it isn't a development shop and they don't want to use F# because they are trying to limit the languages they support right now (Too many legacy apps). Which I understand, but at the same time I think we are really missing out.
Especially because they are developing the front end to be a very Functional Typescrip SPA. Anyway I've been learning F# in my spare time just for the heck of it.
In C#, I think ORM classes have a lot going on, so I prefer to use them only for converting to a data structure.
I've scripted Google Maps scraping using F#. It doesn't showcase any particularly functional features, but you can see there is very little code (relative to C#) in order to accomplish what I needed. [0]
P/Invoke works well, too. I've called native Windows APIs to audit user-mode and kernel-mode memory usage. [1]
The last project generates a Mandelbrot image in parallel. It's as easy as `Array.Parallel.init` on line #81! [2]
[0] https://github.com/ChadSki/MapMaker/blob/master/MapMaker/Pro...
[1] https://github.com/ChadSki/RamCensus/blob/master/RamCensusFs...
[2] https://github.com/ChadSki/FSharpMandelbrot/blob/master/FSha...
http://blog.tamizhvendan.in/blog/2015/07/23/creating-mock-ap...
That said, people have used F# for pretty much everything - including data science and analytics, domain modelling (and business application development), testing (Canopy for web testing), build automation (check out FAKE and Paket). I guess you get the most value from F# by using it for some analytical component (implementing some logic), but the above blog post has many great ideas in other areas too.
It's the old adage of "Show me your [code] and conceal your [data structures], and I shall continue to be mystified. Show me your [data structures], and I won't usually need your [code]; it'll be obvious." -- Fred Brooks
I'm digging this poker hands Kata
http://codereview.stackexchange.com/questions/43831/poker-ha...
Other than that, sometimes there are problems with libraries that specifically target the C# compiler's exact output. Examples are functions that take an object, then dynamically look at the property names instead of just using a dictionary (F# can do this, just isn't a major focus like in C#). Or poorly written expression tree code that only works with C#'s output. That said, the F# community can often find a fix.
Once you adjust to writing so much less code, it's very hard to enjoy writing C#.
I'm uninterested in C#; so I'm trying to make the case for F# (and to be more brutal: And work good enough under OSX, because all my dev work is on it; plus looking to do iOS dev with F#: That is harder than I was expecting!).
I like the language, not as much as python/pascal but is great enough. I'm toying to build a compiler, and building some utils and porting (ie: experimenting ;) ) a massive obj-c project.
So far, my only gripe, is the extremely weak support for any other database that is not Sql Server. No F# native ORM work on OSX as-is. Sql Type-providers neither. You can make some basic stuff and crash faster after you try anything barely complex, like do a search ;)
I was forced to use NServiceKit (a clone of ServiceKit before go commercial) because was the one that I made to work, but then is made in C# and it break the expectations I was having with F# (like https://stackoverflow.com/questions/31866227/why-im-getting-...)
So, that is my 5-cents: Expect pain outside VS/Sql Server, and I'm not fully convinced on the Web story neither (ie: Nothing as great + simple as django or flask on python)
There exists a very good ADO.net wrapper for F# called FsSQL
https://github.com/mausch/FsSql
Dapper can also be used with F#: https://gist.github.com/vbfox/1e9f42f6dcdd9efd6660
Neither are true ORM compared to say nHibernate, but both include mapping to .net collections. I generally prefer this approach over a true ORM for flexibility.
The demos that Tomas Petricek and others in the community do are nice, but in real-world applications of even moderate complexity you almost invariably run into impedance mismatches and annoyances.
I'm currently working on a F# backend for a service with a WebAPI 2 front-end.
- We had to create a C# glue project to be able to publish it as a web app on Azure. This works, but dependency tracking across language barriers in .Net is flaky, so we have to remember to add all Nuget packages to the glue project manually, or we get run time errors in production (not during compilation or locally in test, but in production) as the assemblies are not published.
- Go to definition does not work across language barriers, even when the projects are in the same solution. So you're in F# code, place the cursor on a data tyope defined in a c# file and press F12 to navigate to the source and you get an F# view of the data structure, instead of going to the source.
- The async models are famously different between F# and C#, so you have to marshall back and forth between them, resulting in a lot of `|> Async.StartAsTask` and `Async.AwaitTask` in the F# code, and don't get me started on how to convert an f# async computation to a .Net Task in C#. Pretty, it aint.
- While you can easily create WepAPI controllers in F#, there are basic things that you just can not do. One that bit me recently: having optional query string parameters. Super easy in C#, impossible in F#. Ended up writing a C# controller just for the endpoints that require this, so now I have controllers in the same API surface written in two languages.
Neither of these things are the end of the world, but they do add up, so for me personally it is not a given that I will use F# for my next project.
I found myself using F# for core libraries with clearly defined boundaries between APIs and assemblies - IMO that's where the language shines right now. You can have your core logic contained in a library with a separate, C#-compatible API.
Using F# for WPF, ASP.NET MVC or ASP.NET WebAPI development wasn't quite as stellar experience, also because of the state of the tooling. I'm even wary about type providers, when they work - it's great, when they don't - you're pretty much screwed with no real recourse. In case of relational DB access, most .NET libraries (both full-ORMs and micro-ORMs) are C#-oriented.
Therefore, after including all the annoyances you listed, it's hard to justify anything more than 'handle core libraries in F# with C#-compatible API, do the rest in C# - it's good enough' to the business...
I haven't used F#, but I do have a bunch of visual studio experience. I noticed if you do add reference to a dll (even in the same solution), go to definition doesn't work. But if you instead add a reference to a project, it does. So you might be able to just delete and re add your references and get it to work.
I'm actually very curious about F# and anything functional these days, however, aesthetically was turned off for some reason.
Show me your best feature upfront and then I'll want to read more.
update: Looks like the moderator or the OP changed the headline to something more appropriate. So my comment is less relevant now.
I don't think there is one magical screenshot that can sum it up. If you take 1s to scroll down you can see screenshots of each individual feature. This is just complaining for complaining's sake.
If you want a visual introduction to F#, check out (shameless plug) www.fun3d.net