3 ms·
I have worked with Haskell, Scala, and OCaml; they all bring the joy of programming into daily tasks, and OCaml has a fast compiler and a great module system. T
by churlin 11mo ago
I have worked with Haskell, Scala, and OCaml; they all bring the joy of programming into daily tasks, and OCaml has a fast compiler and a great module system. This makes it a really fun and effective language to use.
- therealdrag0 11mo agoScala has some quirks but I enjoyed it relative to more popular languages and its apparent stagnation makes me sad.
- vips7L 11mo agoScala just seems to have an ever changing identity. Scala 3 drastically changed syntax and now they're trying to move the language from monads to effects.
- abathologist 11mo agoOne of OCaml's outstanding, but too little mentioned, virtues is the community's commitment to extremely strong backwards compatibility guarantees.
- Quekid5 11mo agoWhich led to a really bad standard library with next to no features... but yes, it's very stable. And, hey, if it works for you, that's great... but Batteries Included can also be great for a language.
- abathologist 11mo agoBackward compat has nothing to do with the size of the stdlib, AFAIK. It seems you want to pick on a different part of the language ecosystem. It's true this a matter of taste, but also worth noting that the OCaml compiler devs have made it very clear they are open to well-motivated extensions of the stdlib, and it has been growing at a decent clip in the last few years.
- Quekid5 11mo agoThe size of the stdlib has a huge impact on backwards compatibility and how much pain is caused by maintaining said compatibility for the authors of the stdlib. I mean... it's hard enough for just any regular library to do that sensibly. So much so that semver (misguided as it is) was invented. IIRC Ocaml always compiles everything from source which has its advantages, but even that is a can of worms. (And sometimes binary compatibility can actually be easier, see e.g. Scala.)
- vips7L 11mo agoThat’s why I just write Java now. It has pattern matching and sum types and they’ll never just break something for fun.
- Quekid5 11mo agoScala 3 didn't "drastically" change syntax -- most of the changes also have automatic rewrites with appropriate compiler switches. The effects story is still pretty experimental, but there's also improvements to 'effects' syntax (for-comprehensions) in "preview" for 3.7. As long as the 'effects' work will let me distinguish pure/non-pure, I'd be happy to use just that bit and stick with ZIO/TypeLevel's ecosystem... which will probably be supported forever, regardless of whatever happens with the "effects" stuff.
- v3xro 11mo agoPerhaps the focus of the team behind the compiler has changed over the years - but there is still backwards compatibility (via TaSTy), the new syntax changes are not mandatory (for the moment) and when they do become so there will be a fully automatic (and correct) rewrite. There are new libraries exploring "direct style" but you can still use cats-effect or ZIO if you prefer. If anything, Scala has a "too much choice" problem (and kinda a community one).
- vips7L 11mo ago> but there is still backwards compatibility (via TaSTy), I don’t know man. I’ve been burned so many times by breaking changes. We don’t even write new Scala anymore. Everything new is Java nowadays.
- Quekid5 11mo agoThe Ocaml module system is great, but the module system in Scala isn't the usual Java package thing... it's traits. It's about as powerful as the OCaml module system on any axis I've ever used, but it's easy to miss how powerful it is. (Scala 3 added some ergonomics to make it easier to use, but it was all technically accessible in Scala 2 with 'workarounds'.)