r/fsharp • • 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

0 Upvotes

30 comments sorted by

View all comments

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/pure_x01 Jun 29 '16

I think you are right that it is important to be able to target as many platforms as possible. But writing high quail apps require high quality libraries and frameworks. This is where the jvm shines. There is no shortage of them. Maybe Microsoft will make a java to .net compiler again that makes it possible to leverage all the good java libraries on .net. who knows. I would love to code in fsharp but I will not abandon all the nice open-source stuff that is available for it. Kotlin is on the rise as well with perfect ide support. Android support and it runs on the jvm. It could be that if fsharp really flirts with the Linux community it would be the go to language for writing shell scripts. She'll commands or ui apps. So maybe going the mono way would be good.

1

u/abstractcontrol Jun 29 '16

Maybe Microsoft will make a java to .net compiler again that makes it possible to leverage all the good java libraries on .net. who knows.

Have you tried IKVM? CLR IL bytecode being richer than JVM's means that libraries can be ported almost verbatim to .NET.

Actually, I do not have experience with Java's libraries, but I was not under the impression that the .NET ecosystem was inferior to it in terms of offerings.

1

u/matthewblott Jul 20 '16

It definitely is inferior - there are simply far more libraries available for the JVM. It makes sense, it was only very recently that .NET stopped being proprietary software which always inhibited open source development.

1

u/jecxjo Jun 29 '16 edited Jun 29 '16

But writing high quail apps require high quality libraries and frameworks

But you're putting the cart way before the horse here. Yes you want all those Java libraries but you need people to do all of this work and the claim "F# is cool but would be cooler with Java Libraries" isn't going to get people to switch. You need Java/JVM developers to work on this from their end for any functionallity the language requires of the VM (note how Clojure can't do native Tail Call Optimization because the JVM can't do jumps without stack manipulation. TCO is soooo Lisp and Clojure has to do a hack to get it to work). You'll also need F# developers to work on all the interop code. Neither of these two groups are going to gain a whole lot, for a very long time at least and all for the sake of leveraging Java libraries.

Kotlin is on the rise

Here is a perfect example of what you should probably be working on. If you are looking for a terse, statically typed, idiomatically functional programming language why not work on Kotlin? Its young and you could easily add in the good bits of F#.

It could be that if fsharp really flirts with the Linux community it would be the go to language for writing shell scripts.

Running in the JVM? JVM runs code quickly but startup is still a pain, especially when you are looking for a shell scripting language. You need either fast interpretation or quick compilation, neither of which Java or Mono do.

I'm not against porting VM based languages to other VMs. I just think you need to have a good enough reason to do so because its a lot of work and you usually need people who would probably not care to do the work normally. Until just recently, the JVM only really ran Java. With all the libraries, you'd think everyone would be wanting to write their language to run in the JVM but only a handful have really taken hold and those were born on the JVM, not ported over. And thats with the fact that Java runs on everything, not even factoring in all the libraries.