Scala in 2018: A Panel with Rod Johnson

Meetup attendees must have their full legal name in their meetup account for the RSVP. We will need this for building security to let everyone into the event.

Rod Johnson has made a splash in the Scala community with his ScalaDays 2013 keynote in New York. He listed examples of Scala being opaque and hardcore FP folks communicating in Haskell as an obstacle to widespread adoption, and called for stability and understanding of "the average programmer." Rod pointed to the qualities of Java which keep it the mainstay programming language. The community response varied. We gather a panel of experienced Scala practitioners to debate Rod's keynote ideas with Rod himself!

The panel questions will be a combination of the moderator, panelists, audience, and meetup member questions. If you have a question for Rod and the panel, please ask it here as a comment. Separately, please take your time and upvote the best questions by liking them and not liking the others. We'll use the most-liked questions in the panel.

A former member

Just a note about posting recordings of meetups at this page under Discussions / Message Board: please see this other group, Adobe Creative Cloud Lovers at http://www.meetup.com/creativecloudlovers/ . All recorded meetups are posted under Discussions / Message Board in a folder that's "pushpinned" to the top of the list. Just an idea. Thanks.

I thought there were some remarkable similarities between your keynote at Scala Days and Martin Odersky's "Scala with Style" keynote. I thought in many ways you were both conveying the same core message, albeit with completely different approaches.

Can you speculate as to why you received such different responses from the community? Or, if you disagree that the messages were similar, will you talk about where you differ with Martin's talk?

A former member

"Java has really pretty awesome tooling."

Many claim that Java's tooling is largely an artifact of poor language design and ecosystem. For instance, IDEs have many plugins for Maven POM files, JSPs, and Spring XML configuration -- largely because libraries opted for XML over using Java's type system effectively. Do you agree with this evaluation? Can we do better with typesafety and a good compiler to relax the need for more complicated tools?

true there are lots of tools created to deal with xml/jsp/whateverbut I personally use very little xml in java or scala and still find java tools vastly more "awesome" than scalato me it looks totally related to the language itself - not the ecosystemthe day-to-day tools i want in my scala ide (eclipse) are :type hierarchycall hierarchytype references search and of course refactorings (rename, etc)

A former member

How about we not disagree, instead ☺? I would also like these basic types of assistance from tools. In fact, you didn't name another one that I kind of like -- automatically downloading source from repositories for seamless code naviation. But a lot of the types of tools beyond this set have deminishing returns for me. Additionally, I'm very sure I'm more productive with Scala+Vim+Shell than I ever was in Java+IntelliJ.

A former member

20.I have come to recognise the importance of identifier names aiding codereadability. Can you please explain to me what aAbstractBeanFactoryBasedTargetSourceCreator is and how it relates to thenon-alpha and therefore, poorly-named, and therefore unreadable, >>= function?

are readable, but perhaps not comprehensible? Perhaps they are only comprehensible when one is familiar with Spring. In this regard, is it possible that both Java and Scala are equally incomprehensible to the unacquainted?

Many people people prefer the former. Why are they wrong? In fact, Dispatch's new API leans heavily on a Shell-like notation.

If you can concede that these symbolic operators make sense and sometimes better imply operator precedence (even though they are not traditional arithmetic operators), how would your advice have applied in the days when Shell's pipe/redirection notation was first designed and not yet familiar?

A former member

I had this same question, I guess. Here's how I phrased it:

Mass adoption often leads to huge masses of poorly written legacy code bases. This only serves to sully the reputation of the language and ecosystem. Why is this better for us as programmers or society at large? Would it be okay for Ruby, Python, Go or one of the other languages to sustain the pressures of mass adoption, leaving Scala to focus more of writing code of a high quality?

A former member

Fair enough. My question is out there, and I'll leave it to the moderator to mix and match as makes sense. The panel is diverse enough that I'd hope that they'd have the same quality of discussion with both Adelbert's question and mine.

19."there are also problems like O-R mapping where the complexity is nothing to do with the language"

O-R mapping is not a problem. It is a degenerate solution that inflicts itselfon us, and if we continue to do nothing about it, our children will have to pay the penalty too. They don't deserve this. Do you agree to some extent and if so, what steps do you recommend to make progress?

Tony, sorry to hear that your struggling with ORM and Dependency Injection. You might want to check out a local JUG (such as http://www.meetup.com...­) where you will meet others who can helpyou develop the necessary skills.

A former member

I had another problem with the talk's comments about ORMs.

We were shown an example of monadic composition, but then you called it an ORM tool. When many people think of ORMs, they think of "active" objects that hide interaction with a database or frameworks that work hard to shoehorn complications like subtype inheritance into the relational model.

The monadic composition illustrated is very much like building SQL expressions with snippets of strings, only in a very typesafe way. This is not terribly different from Hibernate's Criteria API, only more typesafe and more composeable/flexible. Would you prefer building queries with raw strings? Do you agree that monadic composition has nothing to do with "object" mapping, but rather treats data as merely typed tuples from the relational model?

I was confirmed. I tried to add one friend as guest and it put both of us in waiting list. Then I removed him and still it shows me in waiting list.I had registered long back for this event and want to attend this.

A former member

To add to Tony's question, if someone implemented the "monitor" pattern in Java, but didn't synchronize a method properly, would "you don't need purity" be a valid defense? Why is functional programming any different?

16."The proportion of junk [in Scala] is definitely higher than it is in Java land"

Clearly you have a different idea of "junk" than a lot of programmers. Where is this Scala junk you speak of? Are you sure that it is not simply "junk" with anapplication that you currently do not have the skills to recognise? If you are sure, by what method(s) have you mitigated this possibility?

A former member

This "junk" comment sounded very suspect to me.

How do you begin to qualify this statement? In your keynote talk, you clearly highlight how much more mass adoption Java has beyond Scala. Do you not agree that mass adoption invariably leads to a much higher density of programmers that make "junk?" Can you please explain exact libraries that you think are "junk" and how you qualify them as such relative to "junk" in the Java community?

15."Before writing any new Scala framework, does it already exist in Java?"

I think you are under-estimating how often this question is asked. The answer isalmost always no. This is unfortunate. Where is a dependency-injection libraryin Java that is not just a pretentious global variable?

A former member

I'd like to ask Tony's question another way:

Many implementors of Scala libraries have already gained a mastery of various JSR specifications, their reference implementations, and popular libraries including Spring, Guice, Hibernate, Guava, and many others. Can you cite an example of where an author of a popular library clearly has no indication of prior art in Java?

Additionally, using Spring as a case in point, many people have solved the problem of "dependency injection" by merely passing in a parameter to a function. There exists projects that scale this technique extremely well when using the higher levels of abstractions that Scala enables. Do you not feel that before anyone builds a "framework" in Java they should first see if the language requires one at all?

14."'I think we really need SIQ or whatever we call it shipping as soon as possible...' coming from one of the more naive members of the community"

You describe Simon Ochsenreither as one of the more naive members of thecommunity. Simon has done a lot of significant work for Scala. I cannot imagine more than a handful of people more capable of this work than he is.

a) Why do you think it is acceptable for you to describe other people in a waythat is otherwise declared unacceptable by others?b) How do you think others might respond to this ongoing double-standard?c) Why do you think Simon is naive?

A former member

I was also troubled by some of your comments about community. In your Scala Days talk, you call for a culture of respect, stating that "respect breeds respect." However, you then proceed to publicly quote both Tony Morris and Simon Ochsenreither without attribution (even alluding to Simon as "one of the more naive members of the community"). Many in the community easily recognized through tone and content the identities of these posters and felt you'd slipped into an ad hominem rhetoric.

How would you respond to those that found your presentation hypocritically as confrontational as the people you were calling out? You talk about building a positive community. What bridges are you making with people in the Scala community doing more FP to offset the perceived attack of your talk?

12."Much real world programming has little to do with elegant expression of algorithms.It has to do with interacting with the real world is a total mess. Like wherever you look ... Databases ... it's a nasty mess out there."

It's only a mess because it was created that way. And databases are noexception. How do you think we might tidy up? Or perhaps, discontinueperpetuating the mess?

A former member

To expand on Tony's question, many companies (for instance, Precog and CapitalIQ) have employees that work really hard to wrangle the "mess of the real world" (including database transactions!) with elegant algorithms. In many ways they have been successful, and often talk and educate people on their successes. They often end up showing the community nice APIs that are both typesafe and highly composeable. Why shouldn't the Scala community strive to understand these techniques and seek more of them out?

A former member

"Another myth that seems to be popular in the community is that object-oriented programming is bad. . . If you don't like object-orientation Scala is not the language for you."

What do you think object orientation is? Your Scala Days talk is extremely vague on this point. Functional programmers often care most about side-effects (which is how computation becomes non-functional in a mathematical sense). Do you believe OO require side-effects? If not, then where is the tension? Do you know of any instances of Scala programmers never calling methods, rather only calling functions on singleton "object" instances? Even ScalaZ seems to use OO-style objects in this way.

A former member

"To look again at the example of Perl, essentially people write Perl in so many different styles, that it's not uncommon to find a line of code that a substantial proportion of the Perl community would find hard to understand."

You claim in your Scala Days talk that Perl suffers from people writing Perl in too many styles. Can you cite an instance of Scala written in so many different styles within the same API or team that the very authors can no longer maintain it? Does the Scala ecosystem/community need to address this problem explicitly? Or should this problem be addressed more by the professionalism of the programmers to only implement what they can comprehend and maintain?

A former member

"You need to converge upon one good way, and make that essentially the industry standard approach. This is actually something I think the Rails community did really well for Ruby."

Many in the Rails community have had issues with standardized mandates from a framework. In fact, there are notable Scala success stories born from Rails nightmares. Complaints with Rails often stem from propping up a standardized solution that does not have enough flexibility (abstraction, performance, etc), and then spending too much time patching the standard's inadequacies. It seems that standardized "one good way" approaches always have this problems. What's wrong with building an ecosystem of small highly compose-able pieces without heavy prescription?

A former member

"I would argue that if you write good Scala code it will be easier to read than Java code, because it will be more elegant and less verbose."

You seem to tightly correlate elegance, verbosity, and readability. I believe these are not as closely related as you suggest. Mathematics-based Scala code is often elegant and less verbose but not easy to read for people with no understanding of mathematical notation. However, mathematics provides us a stronger ability to do many things that programmers value, including high degrees of abstraction, reuse, composition, and correctness -- higher than anything one can do traditional Java patterns. Why isn't this worth the cost of writing code that may not be readable to the unacquainted? Can they not be taught in the same that way that people not acquainted with Spring or Hibernate are taught?

A former member

"Java is not going away, so we want to really play nicely with Java, not just completely replace it."

You seem to have concerns that Scala libraries are rewriting quality Java libraries either redundantly or poorly. What projects do you feel are attempting to replace Java libraries completely in a way that's ill-advised? You spent some time talking about Dispatch, but I believe that's merely a thin wrapper around the Java HttpAsyncClient library.

A former member

"We have a mix of folk in our community, and there do seem to be quite a few people that aren't focused on solving real world problems. And I think that is a bit of a problem overall for Scala."

Beyond Tony's question, I'm very interested in explicit instances of this problem. Would the ScalaZ library fall in this category of not-real, impractical work? Do you believe people are using this library (or others like it) more for pedagogy than professional work?

A former member

"Java is pretty much equal as the #1 programming language with C in world. Is that an accident? Is Java very bad? Does Java suck massively? Is this a complete random accident? I don't think this is a complete random accident, and there are also some things very good about Java, and we should also consider them."

You imply that Java is popular because it is good. How does popularity correlate with intrinsic goodness? This rationale is often cited as "argumentum ad populum" or "appeal to popularity." Can you refine your argument such that it doesn't slip into this logical fallacy?

7.You say you "encounter people who write [Scala] code that is pretty much impossible to read."What code is this that is impossible to read for you and how might others helpyou develop the necessary skills?

5.You say "Scala has... culture of unreadable clever code." Who do you think wrotethat code? Do you think that person cannot read it? What about all the otherswho go right ahead and read it? Do they exist? Is it possible that this"unreadability" is not in the code after all?

2.The Scala community has an unfortunate history of people saying things like,"mixed community, includes purists and zealots." Why do you think it isacceptable to continue creating nonsense social distinctions like this? Do youever consider the adverse impact? Do you ever ask yourself if it truly is thepeople you are isolating, or is it the knowledge that you do not have? How doyou think you would respond if this same behaviour were mirrored back to you?

1.You say "people like me, they like type-safety" and "always been a fan of strong typing." Why do you think that "working with the messy real world such as databases" necessitates going back on this position? What benefit might be had here that is unavailable in othercontexts?

Question for Rod: your Scala Days keynote noted the dearth of coding standards for Scala. Do you have a recommendation on how the language and tools can support and communicate better coding standards?

We're about:

SF Scala is a group for functional programmers who use Scala to dominate the world. We build APIs, Big Data flows, and startups powered by Scala. We do more with less people and less resoucres due to Scala's incredible power. We meet to discuss best practices and how the technology is being used successfully by organizations.

SF Scala covers San Francisco, and events are coordinated with , which covers the peninsula and south bay.

If you would like to present a technical talk about Scala, or how Scala is used in your organization, please contact one of the organizers. If you want to host, contact us. We also are always looking for video sponsors to continue our recordings.