by JaggerJo · 3y ago · 0 comments
1. No standard and easy way of implementing interfaces
No problem in F#, you have interfaces, abstract classed, ...
2. Bad standard library
In F# you have access to the full .NET standard library and ecosystem. There are also quite a lot of libraries that are especially designed to take advantage of F# (SQL libs for example).
3. Syntax problems
3.1 OCaml doesn’t have a single-line comment syntax.
It's `//` for single line and `(* comment *)` for n line comments in F#.
3.2 It has for and while, but no break and continue. So you use exceptions with a try inside the loop for continue, and outside for break.
Same in F#, use recursion.
Generally F# solves some of the issues but definitely not all of them. Some are just in the nature of the Standard ML syntax I guess.
4. Rest of the package is also not that good
- NuGet is a decent/good package manager. - Easy to install a complete dev env. - sane build system (MSBuild) - Great out of the box support in JetBrains Rider/ Visual Studio (for Mac/ Windows) or via a VS Code plugin (Ionide).
I use a lot of rust in my spare time. The runtime guarantees it offers make other languages feel like a house of cards in comparison, including F#. I coincidentally picked up an ocaml book yesterday seeking a more 'robust' alternative to F#. Unfortunately it seems as though ocaml is even more niche than F# (I doubt I'll be working for jane street any time soon)
I've been saying this about Kotlin on the JVM for ages. Using a Java dependency is an absolute last resort for me for those same reasons you mention about .NET from F#.
[1] https://github.com/fsharp/fslang-design/blob/main/RFCs/FS-10...
The fact Microsoft seems to pretend it doesn't exist is bewildering. Surely the .Net ecosystem can have two languages being promoted.
It is really not having a clue what purpose they want for F#, I bet they have repented to ship it on VS2010.
First it was for libraries only, then during the VS Express days it was for Web development, now they are trying to pivot it into data analysis and ML, while DevDiv manages to bring Guido out of retirement and finally manages to pursuade CPython core team about improving its performance.
I very much feel this, I found it productive, but it feels like a complete ghost town. I'm considering swapping to Go over using .NET for tooling/scripting.
One good thing is the ability to bind new operators, so if you don't care to learn to read <> you could make it something else. Or you could have a local binding for Sequence so you don't have to use just Seq.
It's also possible to avoid almost all operators if you don't like them. There's nothing wrong with using a limited pool as long as you can get done the job!
I also prefer to name variables, functions, and parameters with nice clear names, and I've not found F# to get in the way of that.
I get your example of ‘seq { 1; 2; 3; }’ but list, array are not even shortened.
I remember F# designed its own package manager (paket) because of NuGet's deficiencies. I haven't been on that ecosystem for a while now. Have things changed? (My memory is that paket added friction and I eventually dropped it for nuget on my personal projects).