I do like Scala, and I haven't touched Scala3, but I've found it pretty unwieldy for actual use. It feels like I'm constantly fighting with the type system in a way that ends up being annoying an unpleasant.
To be clear, it's not like I'm new to functional languages and their type systems, I've been doing Haskell for forever, and I did F# for a multiple years, but Scala has never really clicked for me.
Personally, for doing JVM stuff, I'm a pretty die-hard Clojure advocate. I feel like it's easy for me to write Clojure in the way that I think, while still allowing me to mooch off the entire Java ecosystem, and if there are things that I don't like about the language it's really not that hard to macro in a new feature (though obviously this should be used sparingly).
I definitely recommend giving F# a try. I think it's an extremely underrated language.
My experience is diagonally opposite. I haven’t written Scala for a while now, I guess a year or two by now, and just a few days ago got back to it because the logic I wanted to express was hard to fit in to Java, Kotlin, C#, Go. I have certain performance and correctness requirements and most stuff is JVM based. So I thought like okay, I can isolate it in a service and invoke from another JVM, but let me just try to express my type families and the algos the easy way around, and whoosh I see Scala compile and give me the correct results on my first attempt.
That was a bit of a surprise - I’d forgotten how expressive Scala is. I didn’t need any “advanced” type system features. But my time to market was literally a couple hours instead of days like with C#, Java, Kotlin, Go, bending to fit the logic into the confines of their type systems. Kotlin is just awesome and very expressive. But it turns out, to me, Scala is somehow very natural - just write what you think, and it works.
Interestingly, that was also my experience many years ago when I first exposed myself to Scala in a numerical analysis class just to avoid Java, and it just worked right away. I recall well that surprised feeling. So I’m kinda happy to move back to Scala now. But I’ll also try to implement the same in F#, right after delivering the next feature set.
> I definitely recommend giving F# a try. I think it's an extremely underrated language.
Do you have any recommendations for people who do not have C#/.NET experience who want to rip their toes in F#? The last time I tried the language I bumped my head on the .NET parts. :/
Out of curiosity, what confused you about the .NET stuff? I didn't have any .NET experience going into F# either [1] and I didn't find it too hard to pick up the .NET stuff.
For the most part I didn't need most of the built in .NET libraries; the F# stuff was fine, but the ones I ended up using a lot were the threadsafe libraries for when I needed mutation across threads. ConcurrentDictionary was one I used an awful lot, ConcurrentBag occasionally, SemaphorSlim, and Interlocked Incrementors.
The reason that the .NET compatibility was handy to me was because it made it easy to get third party libraries without much fuss, which was great because they were generally pretty well supported.
The rule of thumb that I used was that F#, while it kind of looks like Haskell, is not Haskell, and specifically it's not lazy, and as such I always kind of pretended I was in the `do` block. Things execute top down, and you can mix in side effects wherever, so you kind of have to pretend everything is in an IO monad, or at least if you see anything that has a side effect in there.
[1] I was hired at Jet.com specifically because I had Haskell and Erlang experience prior. I had never written any significant C# code before.
I was working on a Linux laptop and the installation process wasn't immediately clear. Some of the frameworks I looked at didn't target the most recent .NET version so I had to install multiple versions. Once I had it installed, I had compilation failures with a project that was built on Windows. The team that ran it wasn't sure what was happening.
Also, having the documentation split between the F# parts on one site and the .NET parts on another site was a bit of a pain.
It might have gone better if I was starting with a book instead of picking docs off the web.
Hopefully this website can get you further with the installation. There will probably still be issues between Windows and Linux specific tutorials, depending on what you are trying to do.
Ah, yeah, the non-windows stuff was pretty clunky for awhile, but I do feel like it's gotten a bit better at the command line support.
FWIW I think it works fine with Nix, so if you're not opposed to using that package manager it should pretty trivial to get different versions working with a nix shell and/or flake.
It is a dream learning guest languages, while trying to avoid the platform, one really needs to understand UNIX, Web, .NET, Java, Erlang... for using whatever alternative leaky abstractions are provided on top of them.
In F#'s case, there are plenty of good books, and then it is really needed to learn the platform.
Some well known ones => Stylish F#, F# in Action, Domain Modeling Made Functional
Thank you for the recommendations. I still find using a physical book easier to learn from, even if they do tend to be out of date faster than online resources. I feel as though F# doesn't move as fast as other parts of the .NET ecosystem, and in particular the Domain Modeling Made Functional seems like it will be relevant for years to come.
It's not so much that I don't want to learn the platform. It's that there is often an inherent sequencing. The expectation is you already know the platform and now you are learning the guest language. I just want to be taught the guest language and the platform at the same time.
To be clear, it's not like I'm new to functional languages and their type systems, I've been doing Haskell for forever, and I did F# for a multiple years, but Scala has never really clicked for me.
Personally, for doing JVM stuff, I'm a pretty die-hard Clojure advocate. I feel like it's easy for me to write Clojure in the way that I think, while still allowing me to mooch off the entire Java ecosystem, and if there are things that I don't like about the language it's really not that hard to macro in a new feature (though obviously this should be used sparingly).
I definitely recommend giving F# a try. I think it's an extremely underrated language.