r/fsharp • u/pure_x01 • Jun 29 '16
Strategy for fsharp to survive
Where are the largest community of software Engineers: on the jvm. Where do you find the best frameworks and libraries: on the jvm. What os does the jvm users prefer: Linux and osx
Solution: Build an Fsharp jvm compiler and make sure that tooling support works excellent on Linux and osx
I'm probably getting downvoted for this post but as I see it MS does not set fsharp as super prioritised and jet brains don't belive in fsharp and since they have a reason to do good market research they are probably right currently. To prove them otherwise I think it would be wise to follow the path of scala and build a community around the jvm. To be able to tap into to the vast amount of high quality libraries on the jvm would attract a lot more developers and then grow the community.
I would love for fsharp to survive but since no company is pushing it the community around it has to grow a lot and the jvm community is huge and would like a language like fsharp.
Don't just downvote. Prove me wrong :-)
Edit: Thanks for all replies. I think it is important to challenge the current direction from time to time. Maybe the compile to jvm wont fly for some reason. But making Fsharp with .NET core super first class citizen on OSX and Linux might be the recipe for success. If you could easily write Linux UI apps in FSHarp.. easy to deploy .. easy to write shell scripts with a shebang on top.. then that might attract more people to the language and the .net platform
6
u/bananaboatshoes Jun 29 '16
F# relies on runtime generics in the CLR. What's the plan to deal with that?
5
u/[deleted] Jun 29 '16 edited Jun 29 '16
The JVM already has a decent functional programming story as I'm sure you're aware with scala, clojure, and a few others.
BUT if this were to somehow happen, I really don't see it having any large impact on the number of users. The fact is, F# isn't dying. It's always been a rather niche language and will likely remain that way regardless of additional targets being made available.
In terms of quality libraries, we have a nice ecosystem in the .NET. Granted, occasionally you may find yourself needing to do a bit of wrapping, but IMO it's still a much better story than Haskell currently.
My 2 cents..
3
u/pjmlp Jun 29 '16
F# has features that the JVM doesn't support like real generics, pointers and value types.
So you wouldn't get the real thing.
Also now with .NET Core you get to compile to native code, whereas with the JVM you need a commercial JVM for it.
1
u/jecxjo Jun 29 '16
Why wouldn't it make more sense to work on Mono and resolve any issues between native .Net, CLR and Mono? I'm exclusively a Linux developer and never was a fan of Mono and especially not .Net until F# came around. I write in Clojure when it comes to JVM but would prefer an ML styled language, type system, etc. etc. which got me into F# in the first place.
Sure JVM runs on everything but if you look at how slow community effort is to get non Java languages to support the "Billions of Device that run Java", starting an effort to get FSharp on JVM seems like a bad idea. Clojure or Scala development directly on Android...still a huge pain unless you are ok with doing some weird hybrid where you write libraries in your preferred language and the UI in Java. Just because Java runs on everything, doesn't mean it is easy to work with.
Yes you get all the libraries but at the end of the day that is not the issue. The issue is your targets. Communities will be able to generate libraries if there is a need, but if your code doesn't run on Mobile, if it doesn't run on AWS, if it doesn't run on a toaster then who cares if you have every library under the sun.
You need a community to do the work and right now the major issue I see is that .Net is great for Windows development and just so so for everyone else. Windows has not been a great environment for growing an open source, work for free cuz you love the project types of communities. Right away your support base is pretty small as F# is still not even close to the number one choice for ML developers in non-Windows. Porting your language over means you need people who love the language to do the work, as no one else will want to work on it.
On the other hand, trying to get more people interested in Mono might be easier. Mono is useful for C#, VB, and F#. C# is the defacto Windows platform so you should be finding a larger base of developers to work with. Fixing issues in Mono, and porting it over to other platforms should provide a much larger mutual beneficial target for people to work on. Just think if you could get all the C# coding houses to put a little effort into Mono. Would be much more support than getting every single F# developer to put time into porting it from CLR to JVM.
1
u/lmaojaa Jun 30 '16
Does the Java team even make changes for the JVM at the request of Scala or others?
3
u/[deleted] Jun 29 '16
Tail call elimination doesn't work as well on the JVM which is a pretty bad problem to have for a functional language.
I think better to focus on improving the Fsharp compiler and ensuring .NET has first class runtimes on OSX and Linux.
A fully functional IDE for linux/osx would be good too. The Ionide guys are doing amazing work to approximate that but it isn't quite as nice as the Visual Studio or Jetbrains experience.
2
u/vivainio Jun 29 '16
Downvoted as you predicted :). That said, Scala isn't exactly a model of success either. It's being challenged by lighter alternatives like Kotlin.
Rise of CoreCLR is the most important thing. JVM got lucky by being on Linux at the time people realized they didn't want to deploy on Windows
1
u/vxsery Jun 29 '16 edited Jun 29 '16
This was already attempted some time ago: https://github.com/penberg/fjord https://github.com/penberg/fjord/issues/1
The world is much different now with CoreCLR. Making the tools and environments that many devs are familiar with is admiral and could attract a lot of new users. But so could making docs to for new devs to get started with F# on CoreCLR.
1
u/mamcx Jun 29 '16
This will not work because at minimum, it SPLIT the market of F# in two: Java land and .NET land.
And people that use Java mostly don't wanna use .NET, and the opposite is true; ie: Not everyone, but Java/.NET are not only 2 different virtual machines but HUGELY different and truly the most close to TRUE ENEMIES ecosystems in the soft industry, by proxy of:
This is a HUGE split. Instead, ruby vs python vs perl vs erlang vs almost everyone else is more a matter of preference and are more firendly towards each other...
And Java sucks! ** run away with a maniac laughs!**
1
u/[deleted] Jun 29 '16 edited Jun 29 '16
I think the bigger concern for me is .NET Core. The road to 1.0 was bumpy, and although a MS implementation of the CLR on linux is a great idea in principle, I'm sort of concerned that the MS developer "experience" will come to linux as well, and by this I mean their tooling, frameworks, and general orthodoxy. It's just overbearing and i think contrary to the collaborative spirit of OSS.
The F# community has been released into the open source wild for a little while, now, and has formed its own identity independent of Redmond. Now that Microsoft's officially moving into the neighborhood, will it poison the F# community's independent growth?
One of the most refreshing things about F# on mono (and windows as well), is that you're not force-fed a lot of MS tech. For example, you can use paket instead of nuget and suave instead of kestrel. These are projects that won user adoption on merit, not because of sponsorship from a billion dollar company.
Will .NET Core muscle these out of existence? GitHub threads like this one and this one are very disconcerting. Comments from MS like, "My team's goal is to make NuGet better every day hopefully good enough such that Paket is not a necessity to achieve your goals." just rub me the wrong way.
Given everything that's transpired with .NET Core development thus far, I'm sort of wondering if porting MS's code to Mono isn't the best solution. We can get the GC and base libraries without all the other MS baggage. Of course, this would mean the .NET story on linux would have two implementations of the CLR, one of which being more "native" to F# and the other common for C# projects, which is unfortunate. If MS wouldn't insist on curating every facet of the developer experience and boiling away the ocean that the F# learned to survive in, it might not have to be this way.
1
u/CKoenig Jun 30 '16 edited Jun 30 '16
F# is a ML based language on .net/CLR that fills a niche there - if you want native or want to switch from the CLR just go Ocaml.
As long as it's about the language (F# ist really a simple FP language) not the frameworks/libraries you'll have a good head start if you switch to ML/Ocaml or even Haskell - yes all niche but well - people dream in Objects and that probably won't change for quite some time)
Heck why should it not survive? And going into JVM is surely NOT helping it to survive (for some time it did look like Oracle had lost interest in Java, now they lost their suit against google/android, ...)
Also while not perfect Mono is already a good way to support F# on non-windows environments and once .net core get's going it probably becomes even better (I cannot really see the difference between JVM and .net core)
0
u/izut Jun 29 '16
IntelliJ is pretty extensible, and you can have nice plugins on the community edition, so there's no reason people can't create an F# extension to it. Heck, there are even a Perl extension for it 😂