TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Road to Scala 3

179 pointsby nuriaionover 5 years ago

21 comments

jacobnover 5 years ago
I love scala, and am very much looking forward to scala 3.<p>For all the complaints about the language that always pop up in these threads: yes, the language lets you shoot yourself in the foot (with great power comes people who don’t apply it responsibly), but it’s precisely that power that makes it so useful and exceptional when judiciously applied.<p>I like to say that scala is as if java and ruby had a love child and it all worked out. Unfortunately, that does mean that java people will feel it’s too fast &amp; loose, and the ruby people will feel stymied by its static typing. But I just love that where other statically typed languages generally say “no”, scala says “well, I trust you know what you’re doing...”.<p>The only substantive tool complaint I have these days isn’t with compiler speed - it chugs through the codebase plenty fast - but with tool startup time. Hopefully the more recent java versions and maybe some native packaging will eventually help with that.
评论 #21851724 未加载
评论 #21853539 未加载
评论 #21852967 未加载
评论 #21852383 未加载
lihaoyiover 5 years ago
The way I look at modern Scala is a mix of Python and Java.<p>Do it badly, and you end up with the unmaintainability of Python and the clunkiness of Java. Awful.<p>Do it well, and you end up with the convenience and interactivity of Python and the typesafety, performance, and toolability of Java.<p>This lets you implement your code quickly the first time, and have it run blazing fast on a hot JVM, with the compiler having your back as you grow your codebase in size and complexity. Sure beats trying to prototype in Java, or porting half your Python prototype to C when you realize it’s too slow.<p>Scala has a bad reputation, well-earned due to an early culture of crazy experiments, crazy operators, and crazy tools. But those days are behind us.<p>You can no longer get stuff into the standard library “just because”, and a lot of the early experiments in that category (xml, parallel collections, parser combinators) has been consciously moved out.<p>Operator-heavy tools like SBT have largely replaced the crazy operators, while operator-heavy libraries like Dispatch have been largely replaced by less-operator-heavy equivalents.<p>SBT used to be awful, but it’s improved a lot. And you don’t need to use it: I haven’t touched an SBT build in years by now, in both OSS and proprietary contexts.<p>There remains a lot of different ways to write Scala, more than most languages, but you don’t need to write Haskell-in-Scala unless you really want to.<p>I’m personally very happy with my Python-like language with Python-like libraries, with static typing for maintainability, orders of magnitude better runtime performance, excellent parallelism and concurrency, one of the best compile-to-JS experiences in the world, and the best tooling (IDEs, profilers, monitoring, etc.) on the market.<p>As someone who maintains optimized programming language interpreters, distributed backend clusters, three-tier web apps, command-line tools, and many other things on a daily basis, I appreciate being able to do all this in one language rather than juggling 5 different languages (and 5 different sets of libraries, and 5 different sets of tools, ...) to satisfy each use case.<p>Scala may be diverse and fragmented, but it’s not as diverse or fragmented as the polyglot Python&#x2F;Ruby&#x2F;C&#x2F;Go&#x2F;Javascript codebase it would likely take to replace Scala for my daily work
评论 #21852445 未加载
评论 #21851869 未加载
评论 #21855629 未加载
评论 #21852239 未加载
solicodeover 5 years ago
I often see comparisons to Go, Kotlin, Rust, etc, and I agree that it&#x27;s unlikely for Scala to have a second renaissance and have an steep upward trajectory like those languages, but is that really a death of a language? I&#x27;m actually fine with Scala narrowing its scope and focus at being really good at just a couple of things. Such as embracing its FP-side more so than its OO-side. Not to say there is no value in its OO-side (I still see some value there mostly pertaining to modules). But I just mean that not every language needs to aim to be a top 5 language. FP and advanced type systems still seems to alienate a significant percentage of programmers for various reasons. That&#x27;s fine. It&#x27;s not like that sentiment is going to change overnight.<p>Scala missed its opportunity with Android. I think you just have to concede that to Kotlin at this point and just focus on moving in a direction that is not occupied. Which is why I mention FP with a strong focus on types. There&#x27;s not much competition there besides Haskell. And since Haskell for the JVM will likely never be a thing (a few have tried, but none have gained traction), Scala is still there. And with the direction Scala 3 is going and all the improvements it brings, it&#x27;s actually looking quite positive. At least in my eyes.<p>And besides, I don&#x27;t think Scala has to be a &quot;worse Haskell&quot; in everything that it does. I think ZIO is a good example of a great Scala library that actually resulted in something really special by embracing what Scala can do: <a href="https:&#x2F;&#x2F;zio.dev" rel="nofollow">https:&#x2F;&#x2F;zio.dev</a>
评论 #21852347 未加载
评论 #21853617 未加载
评论 #21852016 未加载
评论 #21854425 未加载
评论 #21854534 未加载
评论 #21852343 未加载
maxafover 5 years ago
When I gave up on Scala in 2016, I did so because its future looked fragmented and uncertain. Fast forward more than three years, and the first release of Scala 3 won’t be out until another year from now. Compare this with the pace of development of Go or Rust: those languages are driven by a vision, and have a dedicated team behind them. Scala is declining because no one could figure out for the longest time what was next and how to work on it.<p>It’s too bad, as Scala did the most of any language to bring me into the fold of statically typed programming. I miss it sometimes, but then I remember all the times Scala wasted my time, and get back to writing Go like a happy little camper.
评论 #21851384 未加载
评论 #21852468 未加载
评论 #21851266 未加载
评论 #21851209 未加载
评论 #21857674 未加载
mellingover 5 years ago
I see a lot of people complaining about Scala. I looked into it 9 years ago but it didn’t seem to be gaining traction so I stopped playing with it:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;melling&#x2F;scala" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;melling&#x2F;scala</a><p>Recently, however, I’ve noticed that Scala does to be be quite alive (3.0, ScalaDays, Cats, Shapeless, Scala.js) so I’m taking another crack at it.<p>I’ve done a lot in Swift and it’s my current favorite language, but it’s not widely supported.<p>When I look at Scala (especially 3.x), I feel like it’s like a Swift++. Go is a great language but I want to move up a level of abstraction.<p>By the way, Scala 3 is now feature complete:<p><a href="https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;programming&#x2F;comments&#x2F;edcenz&#x2F;dotty_scala_3_feature_complete&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;programming&#x2F;comments&#x2F;edcenz&#x2F;dotty_s...</a>
评论 #21853440 未加载
dominotwover 5 years ago
I switched to clojure for a new job from doing scala for 5 years. I just feel a weight has been lifted off of my head. Weight of syntax, slow compilation, weight of implicits ( some of them are so bad even editors like idea couldn&#x27;t figure out what is going on). And most importantly the weight of the constant feeling of not being able to fully understand the meaning of endless math terms thrown at me casually like monads, freemonads, applicatives , categories, Kleisli ect.<p>I spent so much time learning what all these math concepts apply in programming but now I don&#x27;t remember what any of these mean anymore and I am still shipping production applications ( in clojure). Sigh, what a waste of my life doing scala :( .
评论 #21851258 未加载
评论 #21851494 未加载
评论 #21851329 未加载
noelwelshover 5 years ago
This is fantastic. Scala 3 is a huge improvement, doing away with main of the pain points of Scala 2 and making using Scala effectively much more straightforward. I&#x27;m looking forward to getting to work with Dotty &#x2F; Scala 3.
评论 #21851685 未加载
ccthrover 5 years ago
To all those saying Scala is dying:<p>Personally I am making top money on Scala gigs, and I don&#x27;t see that changing anytime soon. The people I meet on these gigs share my opinion. Most people wouldn&#x27;t take a Java job even if it paid more, same for Go or Node ( both of which I have used in production in the last month, and wouldn&#x27;t take over Scala, with the exception of serverless)<p>Teams in Media, Government and Finance are leveraging Scala to do things that take Google and Netflix twice as many devs because they use less expressive languages.<p>Yes, Go is great because you can scale a team from 1 to 10 to 100 with little effort. With Scala you get the same stuff done with 20 people.<p>The people that hate Scala are either Java devs that didn&#x27;t get it because they wanted to write inheritance based OOP code and would still be bad devs in any other lang, or are hiring managers that struggled to get the right people.<p>This is actually an advantage when you have the right hiring process as you end up with better developers - they don&#x27;t need to know Scala, but need to be open minded to new ideas and motivated to learn.<p>With all that said, the church of FP and the hascalator community is a problem for Scala. Overly dogmatic &amp; academic functional programming styles don&#x27;t have a place in production systems.<p>Leverage the type system, immutability and the Future&#x2F;Option monads and you eliminate huge swathes of bugs. If you are looking to write &quot;Java on steroids&quot; or would rather be writing Haskell then you are probably contributing to Scala&#x27;s perceived problems.<p>If you are a startup or small business then Scala isn&#x27;t a good fit - you&#x27;re probably better off starting with JS or Python and moving to Scala when you have more users and need to deliver something solid. FAANG don&#x27;t need to use Scala because they can throw money &amp; devs at problems and therefore favour languages that fit that modus operandi.<p>For all the companies in between, Scala is great fit because when you get the right people you can outmanoeuvre any competition.<p>One of the earlier comments described Scala as a love child between Java and Ruby that turned out great. Despite not having used Ruby in anger I agree with the sentiment as I believe the best way to write Scala is as a statically typed Ruby for the jvm. It&#x27;s supposed to be simple and elegant, and the best Scala devs realise this. To re-iterate my earlier statement, if you are trying to write something &quot;oop&quot; or &quot;pure fp&quot; then you are getting it wrong.
评论 #21853205 未加载
评论 #21853245 未加载
评论 #21853276 未加载
评论 #21853530 未加载
评论 #21853949 未加载
sgtover 5 years ago
The more I read about Scala it makes me wonder why (1) I am not using it (or my team) (2) Java teams across the world are not at least seriously considering changing to Scala. It seems likes it&#x27;s miles ahead of both Java and even Kotlin.
评论 #21852272 未加载
评论 #21852312 未加载
pinopinopinoover 5 years ago
I love Scala, it has a nicely advance static type system, supports functional programming and has even macros, although they are a bit messy. Something I miss in go and python. Go&#x27;s type system is way to simple and python is dynamic, which I think is unnecessary these days. Static type systems can be as expressive as dynamic ones. It has interesting libraries, like cats, shapeless, breeze. And it is popular in the big data field.
评论 #21852498 未加载
jatcwangover 5 years ago
I was initially skeptical of Scala when I landed my first Scala gig a few years ago, but now I&#x27;m really glad I picked it. Simple things like pattern matching and immutability are amazing, and Implicits + Macros enables some awesome libraries like Shapeless[1], Chimney[2] which solves real business problems in a succinct and type-safe way.<p>Very excited about what&#x27;s coming in Scala 3<p>* Lots of improvements to make the language simpler and easier to work with * Integrating some tried-and-true patterns from the current Scala ecosystem directly into the language * First-class tooling to solve some long-standing issues in the ecosystem (binary compatibility)<p>The team behind Scala 3 has done a tremendous job. Along with the whole movement of better tooling that&#x27;s happening in the Scala ecosystem right now, I think the language will have a fun and productive future!<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;milessabin&#x2F;shapeless" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;milessabin&#x2F;shapeless</a> [2]: <a href="https:&#x2F;&#x2F;scalalandio.github.io&#x2F;chimney&#x2F;" rel="nofollow">https:&#x2F;&#x2F;scalalandio.github.io&#x2F;chimney&#x2F;</a>
评论 #21853582 未加载
devitover 5 years ago
The problem of Scala is that it is outclassed by Rust and Kotlin at its two niches of, respectively, &quot;best designed programming language&quot; and &quot;better Java on the JVM&quot;.<p>Scala can&#x27;t beat Rust because you can&#x27;t have safe concurrency (and also single-threaded mutation control) without linear types, and you can&#x27;t have linear types on the JVM; furthermore, a GC and VM-based language is inferior to a native non-GC one providing the same guarantees.<p>Scala can&#x27;t beat Kotlin because Kotlin is designed to be just a better Java and Scala also tries to do other things that reduce Java compatibility; pivoting would result in being behind Kotlin with no hope of catching up.<p>Furthermore, its core features are cute but fundamentally broken: class inheritance is an anti-pattern and functional features need either purity like Haskell or mutability control like Rust to work safely and efficiently; on top of that, the language is also complicated and hard to learn.
评论 #21855929 未加载
评论 #21854865 未加载
评论 #21853865 未加载
bchernyover 5 years ago
I really love Scala, but I worry about its future given Google putting its weight behind Kotlin, and the two offering a lot of the same features and philosophy.<p>Does anyone know if the Scala maintainers have addressed this directly?
评论 #21852041 未加载
评论 #21851638 未加载
idclipover 5 years ago
The problem with scala is that the docs were too late to come.<p>Those who put them out are geniuses (props Cats ppl, ZIO too) - but it seems it is now too late. You know there’s irony that alot of the earlier docs were based on haskell books, too.<p>Its not the math. Look at haskell’s freenode presense vs scala’s. Scala’s a 6th of haskell. What haskell had over scala is docs and community.<p>Scala was just too late, and my coworkers are all whispering Kotlin. It’s a real shame.<p>Irony edit: i actually maintain a scala codebase at work, one of two under thirty other devs who do, and me and one of the major players in the team were talking about this only two days ago. Sort of a sad kind of funny.
评论 #21851661 未加载
walkingolofover 5 years ago
For anyone curious about Scala 3 and its new significant indentation syntax, I wrote a small Scala 3 project which also uses Graal native-image.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;olofwalker&#x2F;ting" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;olofwalker&#x2F;ting</a>
wffurrover 5 years ago
Can we talk about this amazing gradual migration plan with code that can coexist at the bytecode level across a major version change?<p>This is a real feat of engineering, and likely to make migration actually happen and be fast and easy.<p>Compared to other 2 to 3 version changes, this is amazing.
wbillingsleyover 5 years ago
The complaints I see about Scala mostly seem to centre on whether <i>other</i> people are adopting Scala. &quot;Google&#x27;s backing Kotlin&quot;, &quot;Rust and Go have more trajectory&quot;, &quot;FP programmers in Scala write too complicated code that puts off the OO developers&quot;, &quot;FP programmers I know are moving to another language&quot;, and of course the sad twitter-wars that seem to break out within the Scala programming community that put people off.<p>Personally, I&#x27;ve found Scala to be by far the best language I&#x27;ve ever worked with. The complaints on the complexity of the library are ones they are (at least partially) trying to address in Scala 2.13. Dotty, though not revolutionary, looks like a nice set of improvements too.<p>It&#x27;s not a &quot;pure FP language&quot; (though some might like it to be), but is a multi-paradigm language on the JVM. It has a lot in it, but moves relatively slowly. To me, those are its advantages, and for someone like me they are fantastic. I am in academia, which means that a lot of my software is written by me for courses and so I get to work on it in patches about twice per year. In Java-land, that&#x27;d mean major language versions are now faster than I get to revisit my projects. In Scala, I&#x27;ve had projects progress from 2.10 to 2.13 (and soon 3) with maybe two days&#x27; effort updating them so they feel fresh with the language, even though the language still feels more advanced than Java, Kotlin, and most of the &quot;faster&quot; competitors.<p>Scala.js works astonishingly well (I wrote my own react-like framework in about 1,000-lines of code, so I no longer need to fuss about whether React&#x27;s just updated so everyone should be using function hooks now either). Graal looks like it&#x27;s going to come along and solve the issues with native deployment soon too.<p>In short, while most of the complaints I hear are about Scala as a community, it seems one of its strengths is how it is <i>robust</i> to the winds and storms that blow through programming communities.
3dprintscannerover 5 years ago
Having recently jumped into a Scala team from a mainly OOP background, I&#x27;m starting to see the light with the language. Using the type system to handle code you would otherwise have to write defensively. Letting the compiler take more of the strain of the second order functional concerns of the program and leaving what&#x27;s left to be an accurate description of your problem domain is a refreshing perspective on coding. Your code looks a lot more like the problem you are trying to solve rather than 75% if(x==null) and 25% business logic. That said, the learning curve is steep and the quasi-hidden nature of implicits never sits well with me. It seems like a way of adding semi-defined behavior to your code and is one of those language features that should be treated with care.
AzzieElbabover 5 years ago
Scala is an amazing programming language without rivals when it comes to flexibility. Having said that, while I feel enormous respect for people who pushed functional programming in scala to the limit and almost mainstream, I think blindly porting 99% of Haskell to scala is largely responsible for scalas&#x27;s observed complexity.
aganameover 5 years ago
I&#x27;m sorry to be this negative, but I sincerely believe Scala to be the worst seriously used programming language of modern times. It should just end.
评论 #21852036 未加载
yahyaheeeover 5 years ago
Scala is dead for anything that isn&#x27;t academic. They didn&#x27;t listen to their customers and ultimately burnt them. Every company I know that was using Scala is running pretty much running any other direction now. It was an interesting experiment I guess.