I've previously used Ocaml at my last job and use Scala at my current one, it's interesting that F# (just judging from this blog post) looks more similar to Ocaml than to Scala - like they've more aggressively pulled out syntax and embraced partial application etc. I'd always assumed F# was to C# what Scala is to Java - and I think that probably does represent their design goals, so I wonder what the different consid…
Why you should learn F#
11–20 of 179 posts
Re: Why you should learn F#
#12I've previously used Ocaml at my last job and use Scala at my current one, it's interesting that F# (just judging from this blog post) looks more similar to Ocaml than to Scala - like they've more aggressively pulled out syntax and embraced partial application etc. I'd always assumed F# was to C# what Scala is to Java - and I think that probably does represent their design goals, so I wonder what the different consid…
F# is the evolution of ML.NET developed at Microsoft Research.
Re: Why you should learn F#
#13I've been diving into f# in 2018. I came from c# world, and it really made me a better developer. Really recommend the language. Think it has a great balance between functional programming and OO if it is really needed. I really do think it's easier to write better .net programs with f# then c#. Think this article point out some great stuff. That said, it's quite hard to actually get to use it in production at the pl…
That's my problem too. I would like to give F# a go but at work it seems close to impossible to implement. Most people don't see the need and if there is a problem it will be blamed on F#. It's hard to win there if management doesn't fully support it.
Re: Why you should learn F#
#14Safer threading with immutability
Safer programming with null-safety
Safer logic with precise domain modeling
The precise domain modeling is the real paradigm shift.
The whole point of static typing is to inform the compiler about your intent so that it can provide guarantees about correctness. F# makes it easy to define lots of small types that precisely model state so that you can give more responsibility to the compiler to verify your program.
I cannot overstate how important this is to maintaining correct software overtime. If you guard your touches with non F# code, you need far fewer unit tests and probably even less runtime checks because you already know if the types are right, so is the logic. And when you need to write unit tests, the functional style makes your tests very easy to write.
I have personally struggled with domain complexity in C# that i was able to model precisely in F# and have it work perfectly on the first try.
Re: Why you should learn F#
#15Do HN users have any F# references, books, or guides they recommend? I've always been intrigued by F# but haven't found a good project / use case for it, but I suspect that's because I need to know more about it first.
I've really enjoyed https://www.manning.com/books/get-programming-with-f-sharp Think it gives a good overview of the language and it's easy to read. Considering that after a day of working I'm not that sharp anymore it was a good read for me. Also mentioned in the article, but Scott Wlaschin book really show the strengths of the language. Most of his stuff is great actually, but his website (FSharp for fun and profit…
That's a great consideration you made, and I'm in the same boat. I'll check it out thanks!
Re: Why you should learn F#
#16F# is 3 big things to me: Safer threading with immutability Safer programming with null-safety Safer logic with precise domain modeling The precise domain modeling is the real paradigm shift. The whole point of static typing is to inform the compiler about your intent so that it can provide guarantees about correctness. F# makes it easy to define lots of small types that precisely model state so that you can give mor…
If you're willing to provide a (simplified) example I would be very interested.
Re: Why you should learn F#
#17Re: Why you should learn F#
#18Glad to see Dustin's good post get some visibility here :)
If anyone is interested in learning F#, there are some resources available:
F# docs index (has multiple guides for specific editors and a comprehensive overview of the language): https://docs.microsoft.com/dotnet/fsharp/
F# on JavaScript with Fable: https://fable.io/docs/
More F# in the browser with WebSharper: https://try.websharper.com/
F# on Azure Notebooks (a hosted Jupyter notebook service that's free): https://notebooks.azure.com/Microsoft/projects/2018-Intro-FS...
And of course, the now legendary (at least among the F# community), F# for Fun and Profit: https://fsharpforfunandprofit.com/
Re: Why you should learn F#
#19Re: Why you should learn F#
#20Earlier quoted context omitted.
F# is the evolution of ML.NET developed at Microsoft Research.
Is that right? I know they have a machine learning library called ML.NET ... but it seems weird to me that they’d recycle the name.
When I hear ML, I think the language (cause I am "old"), but it is usually the process (Machine Learning) cause that is what is hot.