Live data from Hacker News

A whirlwind tour of object-oriented code in F# (2012)

fsharpforfunandprofit.com

11–20 of 130 posts

Re: A whirlwind tour of object-oriented code in F# (2012)

#11
post #8

The problem is F# doesn't get enough resources internally at Microsoft. How many times has VS shipped missing the latest version of F# tools? In terms of community, it's tiny. If I want to do functional programming, F#/.NET isn't the strongest option. I have several books on F# and as much as I'd like to learn/use it beyond toying around, I can't help but feel like all it's worth using for is tinkering (outside of th…

I find this to be an interesting cultural phenomenon, this thing where people in .NET-land are skittish about F# because it's not so tightly controlled by Microsoft.

Meanwhile, I'm pretty sure nobody even wants Oracle to be getting involved in Kotlin or Scala or Clojure.

Re: A whirlwind tour of object-oriented code in F# (2012)

#12
For all the love Microsoft has been getting these days, I still don’t get how I’m supposed to write C# or F# without Visual Studio and Windows. Am I missing something? VSCode doesn’t support these languages, right? I’m a person who spent a long time trying to write Java in Vim, but switched to IntelliJ and wouldn’t want to write C#/F# without some comparable IDE.

Re: A whirlwind tour of object-oriented code in F# (2012)

#13
Been using F# on personal projects and C# at work. I noticed my C# coding gone high quality once I got into functional thinking. It is highly recommended for anyone to check/learn F#. F# is my goto lang. now to competitive programming too. I believe F# and ML will make a great combo, but python is still leading.

Re: A whirlwind tour of object-oriented code in F# (2012)

#14

For all the love Microsoft has been getting these days, I still don’t get how I’m supposed to write C# or F# without Visual Studio and Windows. Am I missing something? VSCode doesn’t support these languages, right? I’m a person who spent a long time trying to write Java in Vim, but switched to IntelliJ and wouldn’t want to write C#/F# without some comparable IDE.

VS Code supports both languages. Check out Ionide for F# support. You can also use JetBrains Rider. Visual Studio also works on macOs btw and if nothing satisfies your taste then you can always just use a plain text editor because all you need to build, run and test your code is provided by the dotnet CLI.

Re: A whirlwind tour of object-oriented code in F# (2012)

#15
I used to be a big Haskell programmer. While I still love the language, I've really come around to the idea that strictly evaluated functional languages like F# or OCaml are the best for programming in. You get the nice functional features but don't have the straightjacket of laziness forcing you into certain design decisions. It's really nice sometimes to be able to mix in impure, side effectful code without having to thread it through a monad. The OCaml family feels like a nice blend of good sound functional features with enough escape hatches to be productive in real world programs that might occasionally need arrays or mutable state or IO. Laziness by default also makes things like debugging or reasoning about performance frustratingly difficult. I do miss Haskell's typeclasses in these languages, though. My ideal language is basically Ocaml/F# but with Haskell's syntax and typeclasses.

Re: A whirlwind tour of object-oriented code in F# (2012)

#16
post #4

F# is a joy to use. After a certain time, many C# developers find themselves writing in a functional style. F# makes this the default, but lets you continue using all of your existing code. Better yet, Linux and macOS support via .Net Core is excellent. F# on .Net Core is now a powerful alternative to Node.js.

The thing I find most interesting about a lot of C# developers I've worked with, trained, etc. is their understanding of "Object Oriented" programming. I have the same discussion over and over again. "Have you looked at F# even to just to see how it works?" "I won't ever use it. I'm an OO programmer, and it suits me just fine!" "Do you use LINQ, and understand you can pass functions into methods etc.?" "Yeah, it make…

It's almost to the point where the deciding factors in choosing between (C#-style) OOP and (F#-style) FP are:

  - Do you want your data types in one line or 20?
  - Pattern matching, or large concretions of if-statements?
  - Race conditions: Quality problem, or fun puzzle?

Re: A whirlwind tour of object-oriented code in F# (2012)

#17

For all the love Microsoft has been getting these days, I still don’t get how I’m supposed to write C# or F# without Visual Studio and Windows. Am I missing something? VSCode doesn’t support these languages, right? I’m a person who spent a long time trying to write Java in Vim, but switched to IntelliJ and wouldn’t want to write C#/F# without some comparable IDE.

F# in VS Code: https://docs.microsoft.com/en-us/dotnet/fsharp/get-started/g...

F# in .NET CLI: https://docs.microsoft.com/en-us/dotnet/fsharp/get-started/g...

C# in VS Code: https://docs.microsoft.com/en-us/dotnet/core/tutorials/with-...

Supported Linux versions: https://docs.microsoft.com/en-us/dotnet/core/linux-prerequis...

Supported macOS versions: https://docs.microsoft.com/en-us/dotnet/core/macos-prerequis...

Rider's also an option: https://www.jetbrains.com/rider/

Re: A whirlwind tour of object-oriented code in F# (2012)

#19

For all the love Microsoft has been getting these days, I still don’t get how I’m supposed to write C# or F# without Visual Studio and Windows. Am I missing something? VSCode doesn’t support these languages, right? I’m a person who spent a long time trying to write Java in Vim, but switched to IntelliJ and wouldn’t want to write C#/F# without some comparable IDE.

Plugin for F# VSCode: https://marketplace.visualstudio.com/items?itemName=Ionide.I...

Re: A whirlwind tour of object-oriented code in F# (2012)

#20
post #4

F# is a joy to use. After a certain time, many C# developers find themselves writing in a functional style. F# makes this the default, but lets you continue using all of your existing code. Better yet, Linux and macOS support via .Net Core is excellent. F# on .Net Core is now a powerful alternative to Node.js.

Node has its place, i wouldn’t call F# an alternative to it. The node community is absolutely fantastic. F# is also an amazingly powerful language and im happy using it on the back end

What is Node's place?
Post reply on HN