Live data from Hacker News

Why F#?

batsov.com

31–40 of 424 posts

Re: Why F#?

#31

F# is beautiful, but I could never crack the nut and get fluent in it. I think the big problem is I only know a little C#, so it is difficult to figure out the object oriented methods that F# depends on. It was the same thing with Clojure and Scala for the JVM. I have zero interest in first learning C# or Java, just to use those platforms.

you are not supposed to do oop in f#

Except that there's a huge number of libraries written in C# that are available to F# (since both run on the CLR), and you have to do OOP in F# to use them.

Re: Why F#?

#32

> which is quite odd for what is supposed to be the flagship editor for F# The flagship editor is Visual Studio, not vs code.

But it's Windows-only, so it's not an option for me.

Re: Why F#?

#33

F# is beautiful, but I could never crack the nut and get fluent in it. I think the big problem is I only know a little C#, so it is difficult to figure out the object oriented methods that F# depends on. It was the same thing with Clojure and Scala for the JVM. I have zero interest in first learning C# or Java, just to use those platforms.

you are not supposed to do oop in f#

F# depends heavily on existing C# libraries and those are all OOP.

Re: Why F#?

#34

> which is quite odd for what is supposed to be the flagship editor for F# The flagship editor is Visual Studio, not vs code.

But it's Windows-only, so it's not an option for me.

Rider is an option for you. Community edition is free too.

Re: Why F#?

#35
post #29

I did try F#, but I was new to .NET ecosystem. For 1 "hello world" I was quite surprised by how many project files and boilerplate was generated by .NET, which put me off. I am all for FP, immutable, and modern languages. But then where are the jobs and which companies care if you write good code? Now everyone wants languages which are easy to use with AI, while reducing workforce and "increased productivity". I have…

I learn them as a fun hobby, with no salary expectations. It keeps the dream alive, and I learn a lot from the Common Lisp community that I do use in my job.

Re: Why F#?

#36
People will do anything except actually try Elixir. :D

...I mean: pipes, immutability, transparent mega-parallelism... helloooo?

I tried F# some years ago (after I was fired from a shop that decided they will go all-in on Java and F# and dropping everything else overnight) and I was not impressed. I mean the language is really nice but the C# baggage and runtime was just a bit much. And I was not left convinced that immutability alone is worth the switch. I suppose we can call F# an FP gateway drug?

Now arguably you get a runtime and some baggage from the Erlang runtime (the BEAM VM, where Elixir also runs), but the guarantees and features you get are invaluable, and have proven themselves many times over the last literal three decades.

Re: Why F#?

#37

F# is beautiful, but I could never crack the nut and get fluent in it. I think the big problem is I only know a little C#, so it is difficult to figure out the object oriented methods that F# depends on. It was the same thing with Clojure and Scala for the JVM. I have zero interest in first learning C# or Java, just to use those platforms.

you are not supposed to do oop in f#

FP and classes are not mutually exclusive

Re: Why F#?

#38

People will do anything except actually try Elixir. :D ...I mean: pipes, immutability, transparent mega-parallelism... helloooo? I tried F# some years ago (after I was fired from a shop that decided they will go all-in on Java and F# and dropping everything else overnight) and I was not impressed. I mean the language is really nice but the C# baggage and runtime was just a bit much. And I was not left convinced that…

The shop went all in on Java and F#? Why not C# and F#? That’s really odd, unless there’s context I’m missing.

Re: Why F#?

#40
post #11

I have a few questions. Can it do GUIs well? How about mobile? And how does it compare to e.g. Scala?

Can it do GUIs well?

I don't know if I would say 'well'. For simple GUIs it's OK but, for non-trivial GUIs I would use the approach to write the GUI frontend code in C# and have it call the F# 'backend'. If for no other reason than that the support and documentation for doing GUIs in C# is much better.

How about mobile?

Never tried, but I'm guessing more or less the same story as above. I would probably start by looking into .Net MAUI for that.

And how does it compare to e.g. Scala?

The biggest difference is that Scala is a much bigger and more of a multi-paradigm language. F# feels smaller and more focused and on its ML roots and functional programming. Not saying that Scala is less 'functional' than F#, but Scala supports you writing your code in a much more OOP way if you want. Yes you can (and sometimes have to) do OOP in F#, but it doesn't feel natural.

Post reply on HN