Live data from Hacker News

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

fsharpforfunandprofit.com

1–10 of 130 posts

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

#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.

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

#5
While there's nothing you can do in C# that cannot be done in F#, the reverse is not true. The biggest thing that comes to mind is to influence the direction of the other language (C#). I've heard it said many times that if you want to see what features will be in C# in the future, look at F#. Too many features to cite (though Linq is the biggest that comes to mind) were in production use in F# long before they arrived in C#.

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

#6
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

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

#7
Years ago I was working a miserable job writing boilerplate template code where I had to sub in variables based on certain conditions, it was using a very bland language to look up data from our database and format the output. I wasn't allowed to download any software onto my work computer despite having a technical background.

So what I did instead to make my life easier was write F# to create a kind of DSL and create the template lookup scripts for me. I did it all from the browser with repl.it, and I generated dozens of scripts and saved myself a lot of time in the process.

Now I mostly use Racket, but F# is where I kind of started out. It's a fun dialect.

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

#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 the few shops that use F# extensively.)

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

#9
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 makes things so much easier. I don't understand why people wouldn't use it."

"That's really more like functional programming"

"...."

Edit:formatting

Post reply on HN