
Getting Started with Functional Programming in F# - dcomartin
http://codeopinion.com/getting-started-with-functional-programming-in-f/
======
keithnz
I've recently got back in to F#, one thing I like is the fact you can leverage
the world of .NET

For instance, first thing I did was I used suave.io to expose a webservice for
a digital IO module ( [http://www.mccdaq.com/](http://www.mccdaq.com/) ) and
it amounted to around 50 ish lines of code. Runs flawlessly.

The F# community is pretty awesome as well with a good ratio between experts
and people learning the language.

~~~
jackmott
SuaveIO is really nice to work with. Peformance is terrible but that could be
fixed. Its on my list of things to have a go at improving some time with some
PRs. I think the big low hanging fruit would be switching from async await to
either Hopac or TPL, which is above my pay grade but there are lrobably othwr
areas that could be tweaked. I encourage perf junkies to have a go at it, as
it wonderful to work with.

~~~
kirse
There's a new F# project out there to utilize ASP.NET Core, which has got
Kestrel under the hood. I just discovered it and have yet to do any
performance testing, but I'd imagine it's pretty in-line with C# results.

[https://dusted.codes/functional-aspnet-core](https://dusted.codes/functional-
aspnet-core)

~~~
jackmott
That looks promising!

------
elcapitan
I'm currently learning F#, and liked everything so far, in particular that you
can learn both functional style as well as interaction with existing .net
apis, which allows you to build typical use-cases faster (as you would know
them from imperative/oo languages, like building a small crawler). I wish
there was a good ML-style language for the JVM.

VS Code has good integration, check out the Ionide plugin.

For a language introduction, this wikibook is quite ok:
[https://en.wikibooks.org/wiki/F_Sharp_Programming](https://en.wikibooks.org/wiki/F_Sharp_Programming)

~~~
fnl
> I wish there was a good ML-style language for the JVM.

Scala?

~~~
hugofirth
This! Don't be fooled by the prevalence of Haskell-like libraries and patterns
in the Scala community (or a vocal subset). Those are absolutely useful but
you're free to use them or not, and if you want to just write ML style
functional code then Scala is great for that too.

There is actually a really interesting (to me) discussion going on about where
Scala sits on the Intersection of Java,ML & Haskell going on in the r/Scala
subreddit at the moment:

[https://www.reddit.com/r/scala/comments/5sv1w5/the_divergenc...](https://www.reddit.com/r/scala/comments/5sv1w5/the_divergence_of_strongly_typed_programming/)

~~~
JimmyM
So, I just started learning Haskell and I learned a bit of Standard ML in the
past.

I was/am expecting Haskell to be broadly similar to ML - what's the main way
the two languages differ?

edit: never mind, from the reddit discussion you linked:

> while these languages are undoubtedly strongly typed, they are not
> referentially transparent by default, and actually embrace some levels of
> imperative programming.

Good read, thanks!

------
pryelluw
I just started learning F# with the help of a well known F# dev. It's been a
fun challenge. Give yourself the chance to try it out. Do check out
[http://fsharpforfunandprofit.com](http://fsharpforfunandprofit.com) Its a
great resource.

~~~
bogle
I worked through quite a few of the exercises on
[http://exercism.io/](http://exercism.io/) and can recommend the challenge and
the community around it for learning by writing code.

~~~
pryelluw
Nice, thx. Ill check it out.

------
smortaz
Great video!

If you want to get an intro to the language w/o installing anything, give
Jupyter notebooks a try - F# intro/tutorial:

[https://notebooks.azure.com/library/fsharp/html/FSharp%20for...](https://notebooks.azure.com/library/fsharp/html/FSharp%20for%20Azure%20Notebooks.ipynb)

(you can just browse it, or sign in to clone & run & edit & ... )

------
j_s
[http://www.tryfsharp.org/Create](http://www.tryfsharp.org/Create)

With Silverlight installed, you can try it in the browser. They really need to
update this to work with just a modern browser!

------
Rapzid
When is 4.1 with .net core support going to be out?

~~~
Scuds
I can do this -

PS C:\foo> dotnet --version

1.0.0-rc4-004771 <\- vs 2017 RC4

PS C:\foo> dotnet new mvc -lang F#

Pretty certain this is 4.1 and already out.

Articles have been around for a while [https://medium.com/real-world-
fsharp/using-f-with-net-core-a...](https://medium.com/real-world-fsharp/using-
f-with-net-core-aa6cfc9ef547)

~~~
Rapzid
Fsharp 4.1 does not appear to be released yet. The download for windows is
still 4.0. Last I looked ionide did not support .net core. I'm betting it will
be released as part of the VS 2017 visualfsharp update. They just called for
help testing RC3.

I'm looking forward to the release and the subsequent smoothing of the .net
core fhsarp ecosystem.

~~~
pjmlp
A few things still need to be ironed up.

Expect full support around .NET Core 2.0 time.

[https://github.com/Microsoft/visualfsharp/issues/2400](https://github.com/Microsoft/visualfsharp/issues/2400)

~~~
Rapzid
Awesome. IMHO to really "take off" fsharp is going to need a super smooth .net
core story including .net core ionide support. It's not a sure thing, but I
can't stress enough my belief in these two things:

* Seemless x-platform with dotnet core

* ionide working with dotnet core(and ideally on par with at least xamarin fsharp support)

