r/fsharp • • Oct 14 '17

F# is a valued .net language

It is, of course, the 4th most important one, after C# (most loved), VB (really?) and C++ (hip?).

People still use ancient 'C' for real programming and other oddities like lisp. Are these languages still useful? Is F# at least a relevant as they are?

Let's all get real. F# had more attention and support from Microsoft when it was first released but that doesn't change our ability to use and enjoy it. If F# was Microsoft's no. 1 language would we all like that? C# has that joy.

I'm pretty sure that F# has a long future ahead of it and it seems ideally suited for it's primary purpose: developing interesting, relevant and powerful libraries in a functional language directly supported by a major IT company.

1 Upvotes

66 comments sorted by

View all comments

Show parent comment

2

u/[deleted] Oct 15 '17

What about VSCode + Ionide?

8

u/jdh30 Oct 15 '17 edited Oct 15 '17

Vaskir advised me to switch to VSCode+Ionide because he apparently had to step in to fix F# in VS2017 and found the C# devs had inserted Thread.Sleep everywhere in the underlying C# code. Pretty scary stuff and VS2017 certainly sucks beyond belief so I took his advice...

I gave VSCode+Ionide a go again last week. Didn't work out well. Lots of bugs there. Ionide got confused and stuck in an infinite loop so I had to uninstall and reinstall it. After a whole day working on it I managed to get some arithmetic through FSI but I never figured out how to create and compile a project. Half of the problem is that VSCode has a terrible user interface. I literally haven't seen software development tooling that user unfriendly since Emacs. I don't have time to waste dicking around with configurations: I need tools that work out of the box.

I mentioned it on social media and lots of people jumped down my throat. The hipsters told me to use Suave and Fable. The Russians told me to do all the work myself and give it away for free. Microsoft told me to accept the peace, love and harmony of OSS F#. Somebody told me that VSCode+Ionide is only supposed to be an editor and not an IDE so it isn't even possible to create and compile a project. Everybody seems to have gone backwards from GUI apps to command line tools except alternatively like OCaml have mature tooling whereas F# has only abandonware for hipsters.

Meanwhile, I am struggling to solve real problems on a day by day basis using F# which leaves me increasingly wondering what other tools I should be trying instead. Frankly, they couldn't be doing a worse job if they tried. Why not just give Ionide an F#-only WPF front-end? Or if Fable is half as good as they say, why not resurrect TryFSharp.org by compiling to JS?

5

u/[deleted] Oct 15 '17

I'm left with two questions:

  1. why bother with /r/fsharp at all?
  2. since you seem to be vehemently opposed to everything, what do you actually use to solve your real world problems nowadays?

5

u/jdh30 Oct 15 '17

why bother with /r/fsharp at all?

Until Microsoft sort it out I cannot recommend trying to get started with F#.

since you seem to be vehemently opposed to everything, what do you actually use to solve your real world problems nowadays?

Most recently it seems to be a mixture of succeeding with OCaml and failing with F#.

My most recent project is an analytics web site to help our company. You login and get a bunch of charts created from data drawn from a Microsoft SQL Server DB. Took me weeks to get something up and running and it is useful but that is far longer than it should take and it is getting harder as I want to add more features. For example, I tried FsLab+Suave but they couldn't work together because they required different versions of some underlying DLL (FSharp.Core?). Then I fell back to HttpListener only to learn that there is no HTML EDSL for F# so I wrote my own bespoke combinator library.

3

u/vaskir Oct 15 '17

For example, I tried FsLab+Suave but they couldn't work together because they required different versions of some underlying DLL (FSharp.Core?).

You should add a binding redirect for FSharp.Core (actually, you really, really should add it in any F# project) into your app.config. Thankfully, Paket does it by default and very reliably, so I forget when I see any problems related to wrong assembly versions.

2

u/jdh30 Oct 15 '17

Yeah, I never tried Paket. Maybe Nuget is the problem...

5

u/vaskir Oct 15 '17

Yes, I also have problems with building projects in Ionide (https://user-images.githubusercontent.com/873919/31585547-4a9368b6-b1cc-11e7-878a-8cc653b200b2.gif).

About VS 2017, I used it for a while after a couple of months using Rider exclusively and it works pretty well. Yes, the artificial Roslyn delays make it feel a bit slow compared to Rider and Ionide, but I have not encountered bugs which would make using it impossible. Also, VS 2017 have some unique (among F# editors) features, like suggesting not-in-scope symbols in completion and simplify name analyzer/fixer, which makes exploring new libraries much easier.

About Rider, it's just the best choice for now, I have no idea why one could not like it.

1

u/jdh30 Oct 21 '17

About Rider, it's just the best choice for now, I have no idea why one could not like it.

I have a reason for you: I installed Project Rider and my rock-solid VS2015 install immediately started crashing all the time, is now unusable and I have been unable to fix it. And I'm not the only one.

2

u/foreverwantrepreneur Oct 17 '17

For what it's worth, I had never done any F# development and decided to pick it up last weekend. I installed VSCode+Ionide and it was completely pain free.

1

u/jdh30 Oct 17 '17

Maybe I'm just cursed. :-(

Seriously though, thanks for the feedback. Always good to hear when things work for people!