Is F# Ready for Production?
blog.dantup.com
blog.dantup.com
To that one, if I were in your shoes, I'd answer "yes" in a heartbeat. Using F# can help you differentiate yourselves on the job market. Everybody's looking for great developers, but you guys have a big plus when recruiting developers who prefer functional programming.
As an anecdote, Dutch startup Silk writes their entire backend in Haskell. Their founder Salar told me that while finding people is harder, the people they find are, nearly without exception, really good and passionate. They want to work for Silk because they want to code Haskell for their day jobs. They don't cost more than "other" developers at all, because they're so happy they can finally use what they feel is a decent programming language at work.
I guess F# has a bit less of a hardcore following than Haskell, but I bet that if you're one of the few functional programming shops in the region, Haskellers (and MLers and maybe even Lispers) will definitely prefer that over C# or Python.
PS: a good JavaScript developer will probably be even more productive than both C# and F#, despite the language being horrible.
A JavaScript developer might be more productive than either a C# or F# developer depending on what kind of app he/she was writing; overall I don't think that would be the case, especially once you factor in maintenance costs of the code over the long-term.
This is not true (I've been a C# dev for many years already, and I've been learning F# for the last months). It's not so easy to switch the mindset and the syntax.
> PS: a good JavaScript developer will probably be even more productive than both C# and F#, despite the language being horrible.
Yeah, more productive the first days (at a PoC phase), but more productive the next months? I don't think so. You need to watch this talk: http://vimeo.com/72870631
Overall, I think I would have been more productive with OCaml. Every language has trade-offs, you just have to understand what they are and how they affect the problem you're working on.
Which is really annoying because I want to do functional programming, but the only place they employ those programmers in the UK is london.
Post a job ad explicitly requiring functional programming experience and I'll bet an enthusiast will end up on your doorstep soon enough. Then you can see whether your fears hold or not.
It's hard to get any new system to be seen seriously. It took the better part of 3-4 years for NodeJS to see any traction, and even then it's misunderstood. I continuously see people following the same patterns in building Node modules as they would for C# libraries.
It looks like you've at least tackled what is a very hard part in many organizations, and that is infrastructure. Not to mention, the new code can intermingle with the old (at least for a while).
I like FP paradigms, I find that it definitely leads to better unit test coverage... Not that unit test coverage is everything.
It suits my needs well. References for functions/values/types would be a big nice to have, but I don't miss it that much. Refactoring? Rename refactoring is in the F# community Power Tools http://visualstudiogallery.msdn.microsoft.com/136b942e-9f2c-... I've never missed it enough to bother. As for the show-stopping bug in the Power Tools formatter, I would not want software someone else wrote re-arranging the white space in my file. Beyond that refactoring support is rather ill-defined. Making a mish-mash of functional and imperative code more functional/compositional/readable requires thought.
> Options are great; nulls are bad
Many functions in the .NET Framework now support a try version which interface very well with F#, thank you. Other than that F# cannot perform the miracle of making external software null safe.
> F# was completely missed from Roslyn
I respect the OP, but I couldn't care less. (See my next comment.) Roslyn in many ways is just playing catch up with F#, anyway.
> There’s little info on what’s coming in the next version of F#
As a language, F# is pretty feature mature. (The big thing I would like to see is dependent types.) The action going forward is with the open source community, https://groups.google.com/forum/#!topic/fsharp-opensource/1C..., which Microsoft fully supports, as it should be with a fully open source language. I know people in the community who already have compiler enhancements, for instance, that should come around in the foreseeable future.
> Hiring developers is already very hard
Fortunately for Tachyus, we have a compelling technology company story and a growing team that makes the F# people (and not just F# people) we want to recruit also want to join us, going so far as to relocate across the country.
This of course does not work for the IT Department of Acme Industries in Flyover, Kansas. The HR department will hate you, but the best alternative is probably to build a core of F#'ers internally. You will have to be creative about your recruiting after that. You need to demonstrate your organization offers a career rather than just a job.
But even then, it is just worth pointing out that there is a massive list of testimonials from those who are already happily using F# in production in a wide range of areas, including finance, science, line-of-business, startups and many more: http://fsharp.org/testimonials/
The title could be qualified with "in our company", but then nobody would read it! ;)
I love F#, but I'm not sure it's currently getting the love it deserves from MS :(
They see F# is easier to sell to the enterprise as a library language, not as a full stack one. Hence leaving that support role for the community.
It sucks a bit yes, but on the other hand F# is doing pretty well in the financial sector in London, for example.
Those used to make c++ and COM/win32 as their main platform think MS has definitively abandoned them and will soon or late drop its support and bet everything on managed languages. Those that now are trying to use javascript think that MS is using it just as a fourth class citizen and will soon or late drop it without much emotions and/or that anyway the documentation support is very poor intentionally. Those of C# think that MS is making fun of them constantly switching from a framework to another and, anyway, that MS is surely betting all again on c++ and javascript. Those of F# think that MS is investing nothing in it and that it is considered just a bastard son of C# and tries to never speak about it.
So if you hear all the voices it seems that MS is investing in nothing and making all unhappy.
OR, maybe, the grass is always greener on the other side.
MS invested quite a bit into NodeJS and libuv for windows. That said, they did little to actually get a tooling option for making native modules easier. I would think that this was to first and foremost get node.js into a place where it is an Azure option. Not to mention that it seems some of their own tooling in this space is using it.
After MS announced the Dynamic Language Runtime (DLR) with managed JScript as it's debut language of choice, I was rather excited. When they brought in IronPython and IronRuby, I was happier still. A unifying platform for many dynamic languages seemed pretty awesome. Then JScript fell to the side, and before long MS support for IronPython, IronRuby and the runtime itself fell to the side.
MS can't support everyone 100%, and backing nothing but .Net has certainly cost them mind share. It's also not like MS is a single hive mind. There are lots of people that have come and gone over the years. I think MS does what its' paying customers (and potentially paying customers) asks of it.
The irony is a lot of this effort has been into a platform (Azure), whose sales and marketing tactics were the biggest driver of me to look away from .Net in the first place. For many years every .Net presentation from MS was pretty much an Azure demo.. and only in the past year or so has Azure actually become a platform worth considering. That said, I hate a hard sell.
I think MS sees the writing on the wall, and knows they'll remain a first class citizen for many developer desktops, and an also ran for the mobile space. That means going hard into both tools, and support. They need Azure, and they need Visual Studio to be a best of breed platform. They've done a decent job at both. If they can get your code to run in Azure, you're a potential customer.. so they'll work to support that.
But the fact that they did not keep full control of F# means that the community had time to setup "The F# Software Foundation" (http://fsharp.org) and develop a really healthy open-source ecosystem around F#.
If you look at the data-science story around F#, there are libraries like F# Data, Deedle, R Type Provider, etc. I'm biased, because I contributed to most of them, but I think that community did much better job than Microsoft would in this area. So "not getting the love" is more like "getting freedom". And I think it really helped F# in many ways.
Do not get me wrong - MS is an important contributor and everyone in the community acknowledges that. But they are just a part of the F# story (there is excellent Xamarin support, great open-source projects etc.)
The refactor/codefix support in Roslyn/VS is great; but I wouldn't even know where to start doing something similar in F#? Can I reuse the functionality? Or is the editor so disconnected that I'd need to implement all the menu etc. myself too? (This would make it inconsistent and not play nice with submissions else's CodeFixes that might draw menus).
For example the tooling issues he mention are solved with a Visual Studio Extension
http://visualstudiogallery.msdn.microsoft.com/136b942e-9f2c-...
His concern with Roslyn seems like a non issues, a f# compiler is also opened sourced and was written in f# on day one. And there are many tools already taking advantage of it being open. So in this regard f# is farther ahead in c# in rubric.
As far a c# being ahead of f#, its funny, as most of the new features the are being added to c# seem to come from f#.
The op approach to hiring dev seems backward to me, you hire smart people and train then on your tools. There are so many good recourses for learning f#, having candidates without f# on their resume does not seem like a issues.
over it is great the he was able to bring f# into his environment. as more people adopt f# for there needs knowledge will spread and his concerns will fade.
Roslyn isn't just about being open source; there's functionality like the Diagnostics/CodeFixes that make it trivial to do some really useful things, which are significantly harder using the F# source.
Overall my conclusion is not that F# is bad; I really love it; but there are some niggles for me still... Mostly around the level of investment from MS :/
IDE Support: Sure, the IDE support might not be quite as developed as C#. But frankly most refactorings are just pressing tab a few times with F#. Refactorings for C#/VB.NET are mostly workarounds for languages that require huge amounts of excess syntax. The IDE support for F# is still way ahead of most of the competition (particularly dynamic languages). The intellisense and error highlighting work fantastically well.
Options/nulls: Yes I suppose you still occasionally have to do a null check if you interface with legacy libraries. but I think having thousands upon thousands of .NET libraries means this is a worthwhile tradeoff. Plus you can use the TryGetX methods in F# far more nicely than in C#. http://luketopia.net/2014/02/05/fsharp-and-output-parameters...
F# missed by Roslyn: F# has had an open source compiler written in F# for years. C# is a ridiculous language to choose to write a compiler in. See http://fsharpforfunandprofit.com/posts/roslyn-vs-fsharp-comp...
What's coming next: F# is so far ahead of C#/VB.NET that this argument is ludicrous. Even if F# remained stagnant it would still always be better than C#. It has sensible defaults: immutability over mutability, functional over OOP, parametric polymorphism over inheritance, lack of nulls over null checks everywhere.
C# has poor defaults that are now irreparable due to the need to keep backwards compatibility.
F# is open to contributions now so I would expect some great things. Joinads, for example... http://tryjoinads.org/
Hiring developers is hard: This is a nonsense statement. Sure, if you want to hire 100 F# developers you might struggle, but you're going to struggle to find 100 good C# developers. Yaron Minsky from Jane Street reports hiring OCaml developers was "the easiest hiring he's ever done". If you tweet that you are looking for F# developers I know from experience that you'll get a lot of responses from very talented developers. Most places I've worked have a terrible time finding decent C# devs - interview:hiring ratio is around 50:1.
http://neildanson.wordpress.com/2012/12/24/the-roslyn-incide...
There is nothing wrong with F#, the language (even though I don't particularly like its syntax), but clearly one has to account for the costs of reskilling the team on a new language, as well as a new paradigm, making a bet on a language with a still uncertain future (will it ever become a mainstream language?) and really non-existent tooling support.
Given that both C# and F# are general purpose, hybrid languages, I don't see a compelling story -- in 2014 -- behind F# that makes it such as huge deal as its advocates make it.
The onus is on them to bring convincing evidence to the table that, once factored in the risks and the costs that arise from the shortcomings, the benefits are still a good bargain in the real world, and with real people, outside of the easy fake example one finds on blogs etc.
The submission asks a question that many shops confront when F# is proposed. And the reality today is that many come to the conclusion that no, it isn't ready for production, for many of the reasons the submission notes. Your outrage will not change this reality.
Citation please? Writing a compiler in the language it's targeting is not always "best", but it is often done to reduce dependence on external toolchains and to flush out bugs in the language or compiler itself (since a compiler is usually a fairly complex program).
Every language has it's own benefits and drawbacks; the ML family of languages (which F# belongs to) was purpose-built for implementing compilers (and theorem-proving tools), so it would have been an excellent choice for implementing Roslyn, or at least parts of it.
Not to mention that it sort of brings a bit of weird legacy cruft from OCaml. Granted C# also drags along some annoying legacy cruft from Java, but using F# on the .NET stack always felt a little bit alien. It was nice, but it definitely didn't quite "fit". How to write "standard" C# always felt pretty simple, but I could never quite figure out what "standard" F# should look like, and it generally clashed a bit with code from other languages.
The first task I tried to pick up was doing backups and restores of our SQL server databases. I spent a couple of hours and couldn't figure out how to get Powershell to do that, but it took about 10 minutes to find a T-SQL command to do what I wanted, figure out how to run it from the command line using sqlcmd, and set up a Ruby script to automate it and generate the commands dynamically, etc.
Powershell also seems to require installing dozens of little thingys for using most of its features, all of which are very picky about bittedness, and which are mostly tucked away in weird corners of Microsoft's sites. Ruby has one installer on an easy to find site, though I admit it took a while to discover that using anything but 32-bit 1.9.3 on Windows will only lead to pain.
As a shell (especially remoting to servers); it's great. As a scripting language, ironically I'm more likely to use F# (FSI) these days, mainly due to two serious bugs in PoSh Scheduled jobs we've never gotten any response from Microsoft over :(
http://pluralsight.com/training/courses/TableOfContents?cour...
I don't see this same attitude in open source - the users are common major contributors to the ecosystem.
Just something I've noticed.
I think the F# community is much more like the "open source" model than the "closed MS model". The change is slowly happening in the rest of .NET, but F# is way ahead here.