230 karma · joined July 22, 2020
If you go onto the scaladoc for Either today, you see a stringly-typed Either where they discard the Exception.
It is /infuriating/ to be knee-deep trying to work out which of your 30 Eithers failed with a non-descript error.
My argument is that as a programmer you /choose/ the base lemmas which you're comfortable with - with an exception you're saying for a large swathe of your code, it will assume a lemma. When is /does/ break you get to point the finger at it with a stack trace saying here is where the lemma was broken. As an aside there are nicer ways to do this ala contracts, but exceptions aren't a /bad/ way.
The equivalent of try.toOption is try catch everything and discarding. The equivalent of flatMapping without adding surrounding context is equivalent to try catch rethrowing. Both of these are /much/ too common in FP codebases.
If you're dealing with dependencies only, then it's a straightforward change. OTOH I've never had an issue with SBT since it's cleanup a couple of years back so YMMV.
It's why Scala 2 and 3 are able to maintain pretty good interoperability.
Result types, Either et cetera make it extremely easy to swallow errors by flatMapping thoughtlessly losing the context of where they were - you typically /want/ the call stack when you hit into an exceptional flow.
For example in Haskell almost all of the abstractions (Monoid, Semgroup) use property-based testing rather than proofs.
Do you mean something else?
Another thing which may be nice to talk about is where the communities are for each language (Racket on Slack and the mailing lists, Common Lisp has an irc...).
If you care about startup times or FFI then don't pick Clojure.
YMMV between Racket and Guile; I would say Racket is better insofar as the culture of documentation is really very good.
In practice, once you learn a Lisp, you can jump between them without too much trouble.
My question was what makes SBT uniquely bad when the topic of build tooling comes up that people immediately comment how terrible it is.
For the record I like lots of languages - dependent types are awesome. I find that the language I reach for will mostly be a function of the problem space.
Just an FYI, certain Lisps have static typing as well.
Take for example the point on syntax - is gradles groovy receiver syntax not just as esoteric as operator overloading?
You will have issues in that library/network/function/language. Learn to be comfortable peeling away the abstraction when you need to.
I've used the build tools of almost all the major languages (JS/TS, Rust, Haskell, Kotlin, C etc) and I don't honestly see any which are particularly easy.
Scala 3 pros:
+ Higher-Kinds + Type-classes + Decent-ish hygienic macros + Decent OO model with mixins + for-comphrension + Compile-time evaluation + Laziness + Currying
It's pretty good at all of them - but not quite.
If you're used to Haskell you'll get annoyed at the fact that the inference is only within a single statement and that polymorphic functions resolve the typeclasses in a particular way.
If you're used to Scheme, you'll get frustrated that the identifiers can't be created easily in its new macro system or you can't manipulate the scope-sets of the identifiers.
If you're used to Erlang you'll wonder why Akka can't reload functions easily.
If you're from Java you'll wonder why everyone is going on about profunctors, effects and finally tag-less.
How can you weigh up the pro or con of a syntax when you haven't used it much? I couldn't tell you whether APL syntax was any good.