Hacker Newsnew | past | comments | ask | show | jobs | submit | churlin's commentslogin

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.


The 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'.)


Scala has some quirks but I enjoyed it relative to more popular languages and its apparent stagnation makes me sad.


Scala 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.


Scala 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.


Significant white space is a drastic syntax change.


Add "-noindent" to the compiler flags. Done.


Perhaps 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).


> 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.


One of OCaml's outstanding, but too little mentioned, virtues is the community's commitment to extremely strong backwards compatibility guarantees.


That’s why I just write Java now. It has pattern matching and sum types and they’ll never just break something for fun.


Which 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.


Backward 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.


The 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.)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: