Live data from Hacker News

What's Next for Scala

lihaoyi.com

121–130 of 203 posts

Re: What's Next for Scala

#121
post #96
post #35

Earlier quoted context omitted.

I’m surprised you had such a bad experience with scala. Or do you think these are problems with how scala is perceived versus how it actually is to use? Personally I liked it. I spent a while doing java web dev with the play framework, and also spent a while doing scala web dev with the play framework, which allowed me to compare directly. I have to say scala is a far nicer OOP language than java. The collection clas…

I had the same experience as you on the beginning. I started with a project in play framework, I was really excited about an improved java, etc. Then some FP hardcore developers came and started to influence younger developers that OOP was not cool anymore, all our system should be composed of Actions and monads of all kinds, and all business logic should be just a big composition of map and flatMaps. After a while t…

That seems more a symptom of an organizational dysfunction than an indictment of the language.

To wit, 15 years ago I was on a team where it was “How J2EE can you get?” Ughh. Along the way they(we) basically forgot to solve the business problems.

And that sion was the end of that.

Re: What's Next for Scala

#122
post #115

Earlier quoted context omitted.

> The native executables are slim What's the size of hello_world.exe?

Dunno about Scala, but Clojure - another JVM language, has a GraalVM native executable for Hello WOrld about 8MB. Not that slim.

How does that compare to similar languages? (Go, Nim, D, etc).

Re: What's Next for Scala

#123
I've taken several passes at Scala but the thing that always stops me is that I find it really hard to read unfamiliar code, including the core API implementations. The only Scala code I find easy to read is impure semi-object oriented code which is the non-idiomatic code that the Scala community tries not to write. I'm not sure if there's some point at which a penny drops and it all starts to become easy, but even if that is true, the time period it takes for that to happen is a real hurdle for newcomers.

To me, you have to be intrinsically motivated to become productive in Scala because of that early friction. Which is fine if you are, but if you're looking at a team of programmers and thinking "how do I get them all over that line" when about half of them have no intrinsic motivation to do that, it's a real disincentive to use the language.

Re: What's Next for Scala

#124
post #115

Earlier quoted context omitted.

> The native executables are slim What's the size of hello_world.exe?

Dunno about Scala, but Clojure - another JVM language, has a GraalVM native executable for Hello WOrld about 8MB. Not that slim.

Not too bad if it's truly statically linked though ...

Re: What's Next for Scala

#125
post #20

Earlier quoted context omitted.

The dig at JS developers is completely uncalled-for. I'm a JS developer and I admire the way Clojure has seemed to skip both the hype and disillusionment phases and jump straight to the productivity plateau.

> The dig at JS developers is completely uncalled-for. Oh, no, as a developer who dealt with web front-ends for a long time, I can attest - it is totally justified. Modern Javascript, in just a matter of a few years from being a small, simple language with a few quirks has blown into this colossal monstrosity. ECMAScript specification today is almost as big as Java's. There are tons of things that were added ( and st…

TypeScript adds that extra Java smell back into the mix ;)

Re: What's Next for Scala

#126
post #36
post #31

Earlier quoted context omitted.

Agree. But slowdown in internet hype doesn’t mean slowdown in industry adoption though.

Indeed and probably there is no perfect measure for this. One way to look at it is Maven download data ( https://i.imgur.com/66yEO9C.png ) where it continues to increase. Another is to look at Google Trends data ( https://trends.google.com/trends/explore?date=all&q=%2Fm%2F0... ) where it seems like it's decreasing in searches.

It's currently used by 2.9% of devs, vs. 2.5% for scala. (Search for JVM language report)

Re: What's Next for Scala

#127
post #76

I’ve been using Scala as my main programming language for over 5 years. I’ve found my “plateau of enlightenment” by sticking to a subset of the features: case classes, for comprehensions, futures, immutability, pattern matching. By avoiding things like implicit, overly complex types, defining/overloading operators, and being dogmatic about FP/OOP I find the language stays out of your way and lets you write code that…

I've done the same by being lazy, mainly treating it as a better Java and only learning new stuff when necessary or obviously beneficial. I want to write good programs, not fancy code.

My advice:

- Options, immutability, pattern matching, and list comprehensions are all awesome and better than the default Javaesque way

- Scala concurrency abstractions all better than Java, but concurrency is still hard. Proceed with caution

-- Except parallel collections. Use those liberally

- No Scalaz or any other FP-crusader stuff ever

- Macros and implicits should be rejected by default in code review. Amazing justifications required

- Enforce coding rules with linters. This applies for any language, but especially important for dynamic and non-straightjacket languages

Re: What's Next for Scala

#128
post #12

> It's not Clojure-dead What does this mean? I thought Clojure has a dedicated, if small, user base.

It's a particularly ugly and distasteful aspect of software / programmer culture to declare anything that isn't either ubiquitous or in the middle of it's hype cycle to be "dead" - even when used by millions of people and providing huge value etc.

It doesn't serve anybody's interests: for all of us, nearly everything we are passionate about in software will be declared "dead" even one day, with this logic. I usually interpret someone saying "X is dead" as saying more about the person expressing it than the language or software they are talking about.

Re: What's Next for Scala

#129

Earlier quoted context omitted.

What's your problem with SBT? I've been using IntelliJ + SBT since I started with Scala and it has been working well for me.

Personally I prefer more declarative dependency configuration. Also the IntelliJ integration is terrible. It thinks so many of the files have syntax errors and doesn’t have reliable autocomplete or goto definition. Also I don’t like how many files there are; though to be fair i don’t know how standard our setup is.

Weird. I've never had IntelliJ give me sbt-related syntax errors incorrectly.

Re: What's Next for Scala

#130
post #33

Scala has the reputation of being fun to create stuff with, but horrendous when understanding other people’s creations. Is this still true?

It's less true now because some of the patterns associated with code that's difficult to understand have been deprecated or flagged by the community to avoid. For example, implicit conversions are now disabled by default. It's possible in Scala to pass a Foo to a function requiring a Bar due to a chain of automatic conversions from Foo -> Baz -> BazMutable -> Bar. This is fun and magical but difficult to understand a…

> For example, implicit conversions are now disabled by default. It's possible in Scala to pass a Foo to a function requiring a Bar due to a chain of automatic conversions from Foo -> Baz -> BazMutable -> Bar. This is fun and magical but difficult to understand and debug. The community and language itself now suggests against this pattern.

I don't have experience with Scala 3 or Scala 2.13, but I don't believe this is true. Implicit conversions cannot be applied more than once.

Post reply on HN