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/ ) 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.
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.
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.
the Suave extension for ASP.NET Core (https://www.nuget.org/packages/Suave.AspNetCore/) is fast and you can use lots of suave specific features, with same performant kestrel as base, because suave is added as middleware.
I've thought about this too, and unfortunately it is not feasible, because of the poor/nonexistent meta programming support in F#. Phoenix uses macros for optimizing functions from templates at compile time, handling translations in a clean way, and removing a lot of boilerplate.
Source: Have spent a lot of time with F#, including writing Type Providers (which would not solve the problem).
I'm not sure what you mean by optimizing functions. I understand quoting isn't the best thing going vs true macros, but fsharp has full metaprogramming capabilities and operator overload plus custom operators produce some nice DSL's.
Anyway, I don't think to be "attractive" it needs to match Phoenix/elixir macros. Nice frameworks can be made in fsharp, and its type system and tooling blows type specs and dialyzer out of the water.
Really it needs to be:
* (x-platform && easy to use) which is why I'm so keen for the official 4.1 fsharp release. The ecosystem around fsharp and dotnet core needs all the sharp edges ground down.
* Smooth OOTB experience
* Community momentum
* Excellent plug/middleware solution(building on top of asp.net core might be the right approach)
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.
True in the sense that Scala has a magnitude higher number of repos, commercial adoption, libraries, than F# (while being much closer to ML than F# in a few important was).
Whoops, my bad, the only faint idea about ML I do have is as the "MotherLode" from what I know of modern-day F# / Haskell --- never looked at Scala so far
That then should be the actual answer to OP's question
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:
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.
You should compare the actual syntax and constructs. I agree that JS and LISP certainly are as far apart as anything else, and Python is as "functional" as any other imperative language.
But Scala indeed is very similar to (1) OCaml and then (2) ML, and last, (3) Haskell in terms of type inference, syntax, and many other FP concepts [1].
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 Its a great resource.
I worked through quite a few of the exercises on http://exercism.io/ and can recommend the challenge and the community around it for learning by writing code.
I'd especially recommend this article: http://fsharpforfunandprofit.com/posts/is-your-language-unre... for a very convincing counter-argument to my thinking about #c had enough functional features that learning f# isn't worth it. It's very high on my todo list basically because of this article.
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.
Ionide in vscode support .net core (both project.json and msbuild sdks), atm there is a temporary issues with rc4, but feel free to use a previous sdk (are really similar, no need to stay bleeding edge, and will be fixing sooner than later).
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)
For instance, first thing I did was I used suave.io to expose a webservice for a digital IO module ( 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.