I have recently divorced myself from Windows 10, and have started a relationship with Ubuntu. I am tired of not having full control over my PC, but that is not what this thread is about.
I have also become a big fan of functional programming in F#. I way prefer the functional paradigm over the imperative paradigm.
However, in Linux, mono and .Net core is a huge PITA. Especially when comparing VS Code to Visual Studio Community. I know there is a product from Jetbrains but you have to pay for that. I have had limited success porting over my F# programs to run in Ubuntu on mono using Ionide and VS Code. It kinda works but not really and requires too much fiddling to be worth it, compared to running Windows.
So what I am looking for is
[ol]
[li]A functional programming language[/li][li]That has a free fully featured IDE[/li][li]That runs on Linux[/li][li]And has a rich library of extras*[/li][/ol]
*By extras, I mean things like working with zip files, working with http, etc. All the extras that aren’t part of the core language but are required to do anything useful.
I should also mention, I am not a professional programer. I am a hobbyist looking to expand my skills into the world of Linux. I have also decided that I like functional programming.
Options I know of are Scala, Haskell, and Lisp. I think F# was partly based on something called ML so I guess that might be an option too.
So the question is: What are my options and what do I need to know to make a decision?
The limiting aspect is almost certainly going to be the IDE. There are a number of IDEish things available for Linux, but the ones which are stable tend to not support any real IDE features (like debugging) and are really just glorified text editors. Everything else (including Eclipse) has always proved to be unstable.
I haven’t done a check in a few years so it’s possible that the landscape has improved. Maybe check to see what all plugins are available for Sublime or Atom.
You might also consider a two-pronged approach where you separate the text editing portion from the debugging portion. There are some (crappy looking but functional) standalone debuggers available.
IntelliJ Community Edition is a free, stable IDE that runs on Linux, but it only does Java. However, there are a few programming languages, like Groovy, that are based on the Java runtime. Potentially, one of those can be made to run on IntelliJ CE and, potentially, one of them is functional.
Scala perhaps? This indicates that it should work via a plugin:
Sophisticated and bug-free product developed over many years
Full, serious IDE with many features and options
Runs on Linux, Windows, Mac, and a few others
Platform independent. Philosophy is ‘write once, run anywhere’. Compiled native binaries.
Interactive debugger
Database support for various databases
Fast and efficient
Comes with a library of over 200 components out of the box, and easy support for add-ons
Just download, install, and run - everything you need is included in the package.
Lazarus is basically the IDE for Free Pascal. The two together are based on Borland Delphi, but with further development. This means that you can import millions of lines of Delphi code and thousands of components freely available on the internet. Also there’s any amount of information available on language-related questions.
I’ve used it a bit, and my experience is that it works very well.
I’m not sure how this suggestion helps, since OP’s explicit goal is F# in a CLI environment.
OP: This page indicates that Mono’s F# package will solve the runtime and compiler question, and Linux Visual Studio Code plus Ionide-F# will handle the IDE parts of the issue.
No personal experience or interest in trying it myself, but the advice seems realistic to me. Almost anyone using Linux for anything other than a hands-off server or a toy adds specialty repositories to the system’s package management, so adding Mono’s repo seems harmless and easy to me.
ETA: no knowledge or research indicating whether Mono makes pre-packaged libraries (or whatever they’re called in that religion) for the “extras” you speak of, but my impression is that Mono is pretty mature and feature-complete, so it may be the best answer.
Extended ETA: “CLI” in this context means Common Language Infrastructure, not Command Line Interface. In other words, the runtime core of .Net/Mono.
I was going to recommend scheme but it’s been a few years since I used it and it’s now become racket. It’s a lisp like language that comes with an ide called DrRacket. It was pretty good for small projects. But probably doesn’t have all the library support of a CLR/DLR language.
Is Scheme recommended over regular (Common) LISP? The usual Lisp package library includes thousands of packages, which was one of the OP’s requirements. I do not know what is the latest and best recommended IDE, though there are surely good ones. I suppose it’s not purely functional, but you can program in that style.
Jetbrains’ Pycharm (community edition) is a fully-featured free IDE. Primarily for Python (which can be programmed functional-style with full-featured lamda functions). It’s totally stable, I’ve used it for years - and the debugging and, especially, version control integration, are awesome.
Thank you for the advice everyone.
I decided to try Rider from Jetbrains, even though it is a non free product. This way I can continue to code in F#.
I have to say this is pretty good. Almost as good as using Visual Studio Community on Windows. Much much better than VS Code.
I think in addition to this I should broaden my horizons a bit and learn one or both of Haskell or Common Lisp.
Common Lisp is well-supported on Linux as well, with Emacs plus Slime and SBCL being the common development environment. SBCL has the advantage of compiling to native binary code and, with Emacs+Slime, is a good interactive system as well. It also has the advantage of a large and active development community, and lots of third-party packages, as you say.
Scheme also has native code compilers, such as Chicken and Stalin, but those aren’t interactive; to use them, you’d develop the code in an interactive system and then compile the finished program.
I’m glad you’re sticking with F# because the .Net runtime and frameworks (and Mono port of it) are really first-class and there’s not much else that comes even close.
If you do decide to move to something more “linux-y”, I’d recommend Scala. It’s functional, it runs on the Java VM instead of the .Net VM so it’s a familiar-ish runtime, and there’s decent IDEs available for it, and it’s popular enough that you should have no problem getting support or finding libraries.
You’re not going to find anything on Linux as good as Visual Studio, I’m afraid. But lucky for you, VS’ F# support was pretty janky anyway, compared to its support for C++ and C#, so hopefully you won’t miss it too much.