
The Last Hope for Scala's Infinity War [video] - luu
https://www.youtube.com/watch?v=v8IQ-X2HkGE
======
tunesmith
I thought this was a potentially strong argument delivered weakly.

First, he poisons the well by talking about "integrity" and "intellectual
honesty". This is a bad move at the beginning of a speech because it is far
too easy to take it such that people with different conclusions are lacking in
those qualities. Given his delivery, I suspect that he might actually believe
that. It would be better if he just owned that this was his opinion and
delivered it respectfully.

Second, the section on academic priorities was weak. He spent a large portion
of the talk highlighting the mission statements of various languages, which is
marketing language. But if Scala made no other changes other than its
marketing language, it would not solve the problems he was highlighting. I
thought too much time was spent on that part of the talk. There's another
moment later in his rushed conclusion where he made stronger points that could
have been fleshed out - how the academic influence leads to theoretical
features that later get abandoned when the academic project is completed. (And
I quite liked his revised marketing statement for Scala.)

I also didn't like that he brought up Cats vs scalaz as a flaw with the
community, given that it became clear later in the talk that he had a clear
bias on which was preferable. That seemed needlessly provocative.

I think the final conclusion of abandoning the OO path was interesting and fun
to think about! I don't know if there's already an opinionated compiler plugin
that discourages the more OO techniques while encouraging FP techniques, but I
can see how that would be a lot of fun to play with, and educational in the
same way that static analysis tools are. (I don't understand why "partial
functions" was crossed out as something to abandon, though.)

~~~
lmm
Discouraging OO would be the worst thing Scala could do. Its one really unique
capability is the fusion of OO and functional: it's a language that can go
toe-to-toe with Haskell, yet also one that lets you switch from Java in a
weekend. Take away the OO support and you'd have just another functional also-
ran.

Sadly while the language itself has excellent OO support and Java interop, the
community support just isn't there (by which I mainly mean: too many people
like DeGoes will shout you down rather than trying to help you).

~~~
jerf
"(by which I mainly mean: too many people like DeGoes will shout you down
rather than trying to help you)."

Proposition for discussion (i.e., I don't necessarily believe this, but I
don't necessarily not either): The biggest challenge facing languages and
their communities that focus on correctness is that the very personality types
that are willing to focus on them are also statistically much more likely to
be, ah, potentially less suited to the sorts of compromises and engineering
discussions that are necessary to make a personal language than other more
pragmatic communities. The sort of relatively uncompromising spirit necessary
to swim upstream against the current general consensus of very pragmatic
programming nearly entirely unconcerned with academic-type correctness is,
well... uncompromising.

~~~
cageface
This is exactly what drove me out of the lisp community. There are just too
many people that insist on seeing engineering decisions between different sets
of trade offs as stark choices between good and evil. Go read some of Eric
Naggum’s rants for a really extreme example of this syndrome.

~~~
kazinator
"The Lisp community" is purely an imaginary construct that only exists because
you want it to.

"Community" is largely a toxic concept anyway.

Oh, we have to have a community. Community this, community that. Nice project,
but where is your community? I can't write a line of code without a community!

Tired of "community".

~~~
cageface
Nice to see that nothing has changed.

~~~
kazinator
You're still seething with hostility with regard to the conditions of a Usenet
newsgroup fifteen years ago that is only very lightly active now. Reddit has
r/Lisp which is more active and very different from old c.l.l. (Not that it's
reasonable to equate r/Lisp with "Lisp community", either.)

~~~
cageface
No seething or hostility here. I learned a lot from Lisp.

------
raquo
His basic argument hinges on incorrect division of devs into Java/OOP crowd
and Haskell/FP crowd. There are plenty of Scala users who don't fit these
stereotypes though. I personally very much appreciate the unique mix of OOP
and FP that Scala allows for.

For me Scala is a very general and a remarkably unopinionated language. It
efficiently encodes and integrates multiple programming paradigms in one
language, letting you pick and choose what makes sense to you.

Scala is useful to a wider range of programmer preferences and skill sets than
any Haskell-on-the-JVM could ever be. It's a feature, not a bug, both for
individuals and enterprises. Pure FP is just some people's preference that
requires a significant buy-in, not the one true way of doing things.

In general, this talk just seems like a case for one man's preferences rather
than a fair summary of Scala's current market situation.

------
philipkglass
The criticisms I found strongest from the talk:

\- Tooling needs improvements. He mentioned how the Scala plugin for IntelliJ
IDEA will flag working code as incorrect. It will _also fail to flag_ code
that won't compile as written. He didn't mention sbt as a pain point, perhaps
because it goes without saying.

\- Scala 3 (Dotty) has the potential to split the community and libraries for
years, much like the Python 2/3 transition. That said, I'm still kind of
excited about Dotty because I only have 10s of thousands of lines of code that
potentially need porting work, not 10s of millions, and that seems worth it in
exchange for stable macros, faster compilation, etc.

\- The Scala community is losing people who just want "better Java" to Kotlin,
and losing people who want pure FP to Haskell. I came to Scala because of
Spark and I keep using it because I have grown to really like it, despite the
pain points. I'm not eager to jump ship toward Kotlin, plain old Java, or
Haskell. But if the community keeps shrinking, and the ecosystem shrinks with
it, I will eventually be forced to jump toward _something_ else.

~~~
hocuspocus
1\. Tooling has seen huge improvements lately. I use many libraries that are
macros and implicits heavy, and IDEA does a near perfect job. LSP support is
coming too.

SBT keeps getting better, and you have a handful of viable alternatives these
days.

2\. All major Scala releases bring breaking changes, this is incomparable to
Python.

3\. By any real-life metric (jobs, conferences, meetups, libraries, ...) I
don't see evidence that the community is shrinking, quite the opposite.

~~~
philipkglass
I encountered IDEA pain with implicits and type checking just yesterday,
relating to a library that uses Cats and Shapeless. It happens enough to
remark upon. It doesn't happen often enough to make me wish I were still using
Python for data processing.

The Dotty transition looks like it will be significantly more breaking than
the changes in the 2.x releases over the past 5 years. I'll be pleasantly
surprised if the transition goes smoother than I expect, though.

I am excited by some recent alternatives to sbt, particularly Li Haoyi's Mill.

~~~
pas
I hope that 3.x / Dotty will be released with a helpful upgrade tool.
Something like 2to3 from Python, but with better success rate (thanks to type
checking).

Also, I hope that this hypothetical tool will get the necessary testing on the
community build system, so it'll be actually usable and useful.

------
justinhj
I’m one of the leads on a large Scala project that I feel has been very
successful. While I have great respect for jdg there are a number of important
things missing from his talk:

Typelevel ecosystem is thriving and has great fp projects including Cats,
Monix, Doobie, Circe and Fs2.

Having Oop is a great gateway so we can convince our pointy haired bosses and
mainstream colleagues that Scala can be gradually adopted into a project

Reactive and actor based patterns, Lightbend and so on don’t get a mention and
yet are used throughout industry and are very valuable tools

ZIO maybe 100x faster than Future in certain benchmarks but can I get a 100x
speed up on my real world oop code, my actor code, even my future based code,
by switching to ZIO

------
djsumdog
I was thinking about Python3/Perl6 as he was talking and glad when he brought
it up.

It's important to note, the world has transitioned to Python3. Django removed
the py2 comparability imports a while ago and the Python3 Wall of Superpowers
stopped updating a while back when it was over 90% green.

For most devs, all new Python code that's green field is Py3. There is still a
lot of py2, yes .. a lot in commercial/closed apps that have embed python in
there, along with scientific applications. But I think that will change
eventually too.

Perl6 is the opposite end of the spectrum. Massive Perl codebases will always
be Perl5. I don't see any enterprise people going to Perl6. If you're like
Booking.com and still using Perl for everything, you code is probably so
decrepit, old and lacking meaningful testing you should just burn your entire
company to the ground so your devs are no longer in miserable agony.

He has a point with Python3: it is a large community. Even with that large
community, and even with how small many of the syntax changes were, it took a
long time to get to py3! Scala is nowhere near as big.

Scala needs to move carefully with Scala3, so that Scala3 is more like Python3
and doesn't end up like Perl6.

~~~
lizmat
> If you're like Booking.com and still using Perl for everything, you code is
> probably so decrepit, old and lacking meaningful testing you should just
> burn your entire company to the ground so your devs are no longer in
> miserable agony.

That's a lot of assumptions:

* Booking.com still using Perl for everything

* Code being decrepit

* Code lacking meaningful testing

* Developers in agony

Do you have some inside information to know that all of these are true?

You also don't seem to understand that companies are in it for the money, not
to provide nice new development projects to make developers happy. If you are
programming for a living, you should know that programs are written to make
money.

By the way, torturing the developers to make a better product, is a well known
meme among Perl 6 core developers.

> doesn't end up like Perl6.

Perl 6 is ending up quite nicely, thank you.

------
jillesvangurp
I think this summarizes really well why I never became a Scala developer and
am now a Kotlin programmer. I like Kotlin. It solves problems I had as a Java
programmer in a way that is easy to understand. It's easy to move from one to
the other. Tools are great. Documentation is great. Etc.

Based on this talk, it's not likely I'll ever become a Scala developer.

For reference, I learned FP in the nineties while in university; was exposed
to monads, and a few haskell dialects (Gopher mainly). Been doing Java for
about 20+ years at this point as well. However, despite this background I have
trouble wrapping my head around Scala. The documentation seems to require a
phd, which I have, just not in esoteric type system kungfoo. I find most Scala
code completely unreadable. I admit, it's me. I'm probably too stupid or
something. But if I'm too stupid, then most people I work with are definitely
not smart enough either. So, that in a nutshell is why I ended up doing Kotlin
instead.

~~~
pas
> The documentation seems to require a phd, which I have, just not in esoteric
> type system kungfoo.

Completely agreed. Though the funny thing is, Scala has/had a Documentation
Tzar and she is trying to get things to a better place. To supposedly take
care of this. I'm very much a learn by example type, so I'd appreciate a lot
more examples (e.g. for methods: [https://www.scala-
lang.org/api/2.12.6/scala/collection/$colo...](https://www.scala-
lang.org/api/2.12.6/scala/collection/$colon$plus$.html) ). On the other hand,
the documentation is open source in the best way:
[https://github.com/scala/docs.scala-
lang/commits/master](https://github.com/scala/docs.scala-lang/commits/master)
anyone can shoot a PR if they feel they can/want-to contribute. And there's
plenty of overview articles ( [https://github.com/scala/docs.scala-
lang/tree/master/_overvi...](https://github.com/scala/docs.scala-
lang/tree/master/_overviews) ) covering a wide range of topics.

Sometimes the fault is with the libraries and their documentation. Especially
anything that's HC FP (scalaz : Let the types speak for themselves via the
Scalaz Scaladocs! and then you're completely at the deep end - for example:
[https://static.javadoc.io/org.scalaz/scalaz_2.12/7.2.24/scal...](https://static.javadoc.io/org.scalaz/scalaz_2.12/7.2.24/scalaz/Zip.html#zip\[A,B\]\(a:=%3EF\[A\],b:=%3EF\[B\])):F[(A,B)]
).

What makes Scala code unreadable is - IMHO - that people rely too much on the
IDE to help them understand and navigate code, or their own familiarity with
that code (or in some cases the code is simply write only, making it more like
obfuscated Perl and KDB+/Q than a modern object-functional hybrid language).

And since Scala has so many faculties, features, facilities to mange code, to
abstract problems and their solutions, and people write almost none of their
design choices down into READMEs or comments, we're left with the code. For
some people it speaks for itself. (For some people types like a -> a tell
everything, for me that's just a function with unknown "functionality",
because it depends on what the fuck the function actually does. Sure, the type
signature constrains the expected return value, and it's useful, but that's
not the architecture, not the rationale of/for design choices, it's just the
safety striping around the sharp edges.)

Somehow Scala is "the PHP" at the other end of the spectrum. Instead of being
too little it usually ends up being too much ( _insert the relevant Paul
Philips rants here_ ), while both are perfectly capable of expressing nicely
designed programs/systems.

Furthermore, Scala is actually a bit weak when it comes to expressing really
high level concepts. So yes, you can do a lot of magic in it, but most of it
ends up being of the Black variety, because "for performance" (minimize GC
pressure) or because that part is still "experimental" (macros/reflection) or
because that part is just ugly and badly designed (collections).

~~~
speedkills
I agree with many of your points, but on that specific example code you
pointed to which I have never used or looked at before, I find it plenty
readable if you know how to read it. That doesn’t mean I find it “obvious” if
you have never been trained on how to read those signatures or come from
another language that does not support these concepts.

Here is how I read this in case it helps anyone

    
    
      Def zip[A, B](a: ⇒ F[A], b: ⇒ F[B]): F[(A, B)]
    

F[Something] is a “container type” or a type constructor, a type that is
parameterized by another type, for example F[Int] could be List[Int] or
Future[Int].

The method zip has two parameters, one a by name reference to something of
type F[A] and the other a by name reference to something of type F[B] and
returns an F of the pair of input types (A, B)

Looks like this deals with three total types, a container type F that must be
the same for input param a, input param b, and the result.

I know nothing about F other than the fact that it contains another type. I
know nothing about A and nothing about B which means I can’t be looking them
up somewhere or using defaults, so the only way I could possibly return an
F[(A, B)] is if I combined the two inputs.

Also, code written in this style is meant to follow the substitution
principle, so I’ll think through a couple of substitutions to see how this
method could be useful to me.

For: F = List, A = Int, B = String

    
    
      Def zip[Int, String](a: => List[Int], b: => List[String]): List[(Int, String)]
    

Since I can’t invent new members of list and the two members of the list may
be different lengths, this must return a list whose length is the minimum of
a.length and b.length containing and int -> string mapping. Handy.

F = Future, A = User, B = LastLoginDate

    
    
      Def zip[User, LastLoginDate](a: => Future[User], b: => Future[LastLoginDate]): Future[(User, LastLoginDate)]
    

This can only return me a User if they have logged in at least once. The fact
that it is two Futures makes me think I am probably querying two remote
servers for this information and that I can’t resolve the new Future until
both of the input Futures have resolved. By the time this Future is ready I
will have a User with their last login date or the Future will fail.

F = Option, A = IpAddress, B = Port

    
    
      Def zip[IpAddress, Port](a: => Option[IpAddress], b: => Option[Port]): Option[(IpAddress, Port)]
    

I may have an IpAddress, I may have a Port, either return to me both the
IpAddress and the Port, or neither. This one is really easy to map out as
their are only 4 possible code paths

    
    
      Some(IpAddress), Some(Port) => Some(IpAddress, Port)
      Some(IpAddress), None => None
      None, Some(Port) => None
      None, None => None
    

I agree some documentation explaining this would be nice, but there is
considerable information I can pull from this signature.

~~~
pas
Thanks for the detailed response and concrete examples!

Reading signatures is one thing (and zip is "easy"), but without examples it
doesn't really help in most of the cases. Because even if I know the concept,
I don't know when it comes handy. (For example I just looked at Forall (
[https://static.javadoc.io/org.scalaz/scalaz_2.12/7.2.24/scal...](https://static.javadoc.io/org.scalaz/scalaz_2.12/7.2.24/scalaz/Forall.html)
... Forall is an endofunctor in an endofunctor category ... ah yes!), and then
there are tools that come with labels (DList's doc page: nice for append heavy
workloads, eg. logging; yes, great, what's Forall good for? What's Strong? Why
Alpha exists? What's =>: ? That's not even documented :( It cannot be searched
for
[https://github.com/scalaz/scalaz/search?utf8=%E2%9C%93&q=%3D...](https://github.com/scalaz/scalaz/search?utf8=%E2%9C%93&q=%3D%3E%3A&type=)
... It's not on the cheatsheet [http://eed3si9n.com/scalaz-cheat-
sheet](http://eed3si9n.com/scalaz-cheat-sheet) .. .I mean it's on it, but it
is only used, not defined. etc.)

That's not a type reading thing. That's the bad documentation, and the
learner-unfriendly naming convention.

------
web-cowboy
Wise words for any project or product that starts in academia but stays there
for too long (building for papers and PhDs rather than real customers). Brave
to deliver such a cutting critique to this audience too.

As a potential newcomer to Scala, many of these points ring true. Hopefully
the community takes a good hard look at itself to see what it can improve.

With some time off this past week I started hunting for things I should be
learning. After doing some research on Scala's popularity and trending I came
to may of the same conclusions John does.

~~~
lptk
> building for papers and PhDs rather than real customers

> the community takes a good hard look at itself to see what it can improve

This has already been happening for a while. FYI, the Scala center is entirely
dedicated to improving Scala usage and its tooling, which JDG somehow forgets
to mention (along with many other positive things happening in the community).

In fact, it turned out in discussions on reddit that JDG is kind of living in
his own bubble, not really aware of a lot of things happening outside of it,
and thinks he is the only one to see some problems that have in fact been
worked on for years. For example, tooling with the Scala center, and the
Scala2/Scala3 transition which has been a _central_ consideration in the
design and implementation of Dotty since the inception of the project!

------
melling
Around 12 minutes in, he mentions Eta, Haskell on the JVM. Says it’s too new
but it sounds interesting:

[https://eta-lang.org](https://eta-lang.org)

~~~
worldsayshi
There's also Frege:
[https://github.com/Frege/frege](https://github.com/Frege/frege)

It's also Haskell for the JVM. Made me wonder why there are two efforts. Found
an explanation:
[https://github.com/typelead/eta/issues/3](https://github.com/typelead/eta/issues/3)

~~~
bokchoi
There's was also OpenQuark CAL, but it looks dead now.

[https://github.com/levans/Open-Quark](https://github.com/levans/Open-Quark)

------
chx
When you invite John De Goes to speak, you are already dead.

~~~
pas
Could you elaborate on that for the ignorant bystanders?

~~~
testies
Presumably it's a reference to the fact that DeGoes refused to roll over when
activists tried to torpedo his conference for inviting the wrong kind of
speaker after a double blind process. And continued to be pestered the next
year because of another keynote speaker's unrelated tweets.

Having been to Lambdaconf, I can attest to it being an amazing event where
people can nerd out shamelessly about functional programming without any
bullshit or hostility. I highly recommend it. Easy to forget this is what all
of open source used to be like, before the sociopaths moved in.

The supreme irony is the comment above seems to come from a guy kicked out of
the Drupal community by the same kind of moralizing busybodies, for being too
neuro-atypical and abrasive...

~~~
chx
Thank you for diagnosing me as neuo-atypical, some might take offense at that
but I don't, I never denied though I never was diagnosed I surely have some
sort of mild ASD.

As for being kicked out, that's for the better. Yeah, it took me long enough
to get over it but really, those days are gone. I should've left on Jan 8,
2013 when it was made clear how much we've grown apart. I didn't, both the
community and I suffered for it. Ending it was good, even if took me close to
two years of grieving to get past it.

I fundamentally disagree with calling the CWG "moralizing busybodies", see my
take on them [https://medium.com/@chx/women-of-drupal-ive-failed-you-
and-i...](https://medium.com/@chx/women-of-drupal-ive-failed-you-and-i-am-
sorry-fa22f37801b5) here. What I described there goes for any tech conference
organizer: when you are given a chance to amplify a voice, make sure it
belongs to someone who deserves their voice amplified. It never was an empty
consideration but past #metoo it matters more than ever.

Once you have your eyes open... really, I was watching a pair ice skating on
the TV while in the dentist chair (otherwise I wouldn't watch such) and it was
appalling how much more skin the clothing of the woman showed than the male.
Everywhere we sexualize women. Let me remind you of that time when the South
Park creators went to the Oscars in female clothing
[http://www.trbimg.com/img-535ac5e8/turbine/lat-
oscarmoment-l...](http://www.trbimg.com/img-535ac5e8/turbine/lat-oscarmoment-
la0004759694-20140201/) this?

------
bobbyi_settv
Where can I find a good description of the typeclasses and "effects" features
in Scala 3 that he discusses (and criticizes)?

~~~
threeseed
At least some of the content is appearing as Github issues:

[https://github.com/lampepfl/dotty/pull/4153](https://github.com/lampepfl/dotty/pull/4153)

------
qop
SBT, implicits, CoC controversy and censorship, scalaz/cats debacle... There
are more reasons not to get involved with scala ecosystem than to get
involved.

I think people get snippet fever when they see a few lines of really pretty
code and they forget how tangled up the scala scene actually is.

I can't believe, after seeing more Rails disasters that I know what to do
with, that I'm looking at a software project and thinking "this shit is almost
as bad as Rails."

Scala 3 could've been the opportunity to murder sbt to death, abandon
implicits entirely, make the breaking changes they need and compose the
foundation for 10+ more years of scala hackery. But from what's visible out of
dotty currently, it's almost entirely invested in the old sins, with a
stronger soundness story nonetheless (congrats DOT team). There's just no way
to slow the train now, too much of it is dangling off the bridge and Spiderman
won't be able to pull it back.

Good riddance. Thank goodness F# is starting to come together.

~~~
YorkshireSeason

       abandon implicits entirely,
    

What's wrong with (carefully used) implicits? What would you replace them
with? Haskell has type-classes, a very similar concept, and it's difficult to
imagine contemporary Haskell programming without them.

~~~
jjtheblunt
they're an afterthought which serve truly no purpose other than to be fancy
via obfuscation?

~~~
YorkshireSeason
Implicits are not an afterthought, but a core feature that enables efficient
context-dependent parameterisation. Implicits let you avoid a lot of boiler-
plate. They are especially useful for well-structured ad-hoc polymorphism,
quite like Haskell's type-classes, the predecessor and close relative of
implicits.

If you don't like implicits, simply don't use them. You can add a style
checker to your build automation that finds and rejects the keyword "implicit"
in your code. As to use of implicits in libraries, you are perfectly free to
pass explicit arguments instead.

Odersky has a couple of recent youtube videos where he explains implicits in
detail.

------
fnord77
I dumped jvm languages for Rust.

Scala _really_ needs to die.

~~~
justinhj
There’s not really much argument behind your point here. Moving to Rust I’d be
concerned about library support for one.

~~~
pas
The Java libraries are plentiful, but not bountiful.

They are ugly, unergonomic, old, unmaintained (or worse, pumped full of
decades of features, but never really refactored), and some are just simply
broken.

Some libraries are of course the exception to these and all due respect toward
them.

------
Annatar
Watched the entire video; still failed to understand why I would pick a JVM
interpreted, impure functional programming language over ANSI common LISP
which I can compile into machine code?

Which feature(s) is(are) there in Scala which trump running straight machine
code for maximum speed and efficiency? I write software which runs on the
command line and is designed to take command line options and work well with
pipes like all the other UNIX®️ tools and the software has to be efficient on
resources and lightning fast. Sell me on Scala.

~~~
pas
Some people just don't like parentheses. And they hate the Paamayim
Nekudotayim (PHP PTSD?) And really like that the compiler helps them (types),
so they are left with Scala.

[https://markkarpov.com/post/lisp-and-
haskell.html](https://markkarpov.com/post/lisp-and-haskell.html)

