6 ms·
Scala 2.13 is now available
- dotdi 7y agoThe official announcement is quite an understatement. This release is big, especially the changes to the collections standard library and compiler performance will have a lot of positive impact overall. Now onto 2.14 and Scala 3!
- type0 7y agoI heard that some are fearmongering that Scala 3 will be as big of the change like Perl 6 and as a result no one will ever use it. I'm not familiar with dotty but somehow it doesn't make sense that Scala core devs would be stupid enough to repeat the same mistakes that Perl did.
- dotdi 7y agoScala 2 and 3 are fundamentally the same language, which weakens the comparability to Perl5 => Perl6. The compiler is new and tooling will change but they do ensure Dotty can handle Scala 2 artifacts. Scala already doesn't offer binary compatibility between major releases, which in itself is a bit cumbersome but it allows them to innovate the compiler. So the change will not be as drastic as it might look. In addition, 2.14 is meant to be a release that eases the transition to Scala 3.
- aphexairlines 7y agoA few differences between Scala2-to-3 and Perl5-to-6 or Python 2-to-3: * Scala 2.14 and Scala 3 will be binary compatible (via an intermediate form called TASTY) * The Scala 3.0 compiler will accept most Scala 2.14 source minus some deprecations that have been coming for a while * Scala is a compiled language and a statically typed one at that, so any source incompatibility or library API incompatibility will be caught by the compiler; fix the issues pointed out and you're migrated.
- lizmat 7y agoFWIW, The Perl 6 Module "Inline::Perl5" allows you to use any Perl 6 library inside Perl 6. After having installed "Inline::Perl5", you only need to add ":from<Perl5>" to your -use- statement, e.g. "use Benchmark:from<Perl5>".
- dtech 7y agoThere's a large amount of effort going into backwards compatibility. Except for some really well motivated very advanced language features (eg view bounds) most code should be source compatible, and Scala 3/Dotty is able to use Scala 2 libraries and there's plans for forwards compatibility with Scala 2.14 (2.14 being able to use Scala 3 dependencies) The big exception is macro's, because they depend heavily on Scala 2 compiler internals. A lot of things you require macro's in Scala 2 will become language features in 3, but for other cases the macro system for 3 is still in active development.
- vvillena 7y agoScala 3 is all about baking common Scala patterns into the language, while making everything a bit nicer to use. It's an evolution and pretty much everyone in the Scala community is eager to adopt it. The fact that it will be binary-compatible with Scala 2.14 will make adoption much faster, too.
- type0 7y agoWhy is Scala not more popular? It seems like such an awesome language, is it because of it academic origins or because it's not functional enough?
- Traubenfuchs 7y agoThere are well established programming languages for every single niche requirement. What's Scalas unique selling point? Where are they supposed to get/"steal" their users from?
- type0 7y agoWell the oblivious answer would be Java, but I get that my contempt for it is the only thing causing me to look at Scala and that's by no means universal as most people are pretty happy with the latest versions.
- manojlds 7y agoWell, it's the language of choice for Spark. That fills the big data niche.
- lmm 7y agoAt a concrete use case level, it's a language where you can write Java- or C#-like code with no "magic": no reflection, no AOP, none of the stuff that tends to be the biggest cause of bugs in real-world Java/C# codebases. All of the stuff that you would need reflection or AOP (or metaclasses or macros, in other languages) for, you can do in plain old Scala code. In the abstract, it's the only mainstream language to offer both higher-kinded types and traditional OO ("extends") inheritance. From one side it offers all the good stuff of OCaml, F#, Swift, Kotlin, or Rust, but with a better type system that makes handling secondary concerns via "context-like" types a breeze. From the other side, it offers similar power to Haskell, but with more understandable performance, a better library/tool ecosystem (IDE, profiler and so on), less reliance on memory-unsafe code in practice (a lot of things in Haskell require C-wrapping libraries for things like image formats, whereas the corresponding cases in Scala wrap Java instead), and the ability to use traditional OO style if you want.
- 7y ago
- dgellow 7y ago> We are delighted to announce the availability of Scala 2.13! > The 2.13.0 release improves Scala in the following areas: > - Collections: Standard library collections have been overhauled for simplicity, performance, and safety. This is the centerpiece of the release. > - Standard library: Future is faster and more robust. Elsewhere, useful classes and methods have been added. > - Language: Literal types, partial unification, by-name implicits, more. > - Compiler: 5-10% faster, deterministic output, improved optimizer. Full release note here: https://github.com/scala/scala/releases/tag/v2.13.0 https://github.com/scala/scala/releases/tag/v2.13.0
- hszeeks 7y agoExtremely excited with the release! I work at a fashion renting company and our backends are built on top of Scala stack. Contrary to popular belief, Scala is actually quite a simple language. Most of our engineers came from PHP or Python, or Ruby and all have expressed how type safety gave them great assurances that everything works if it compiles. On top of that the behaviour of the language is very predictable! We almost never use debugger because we can predict quite successfully what went wrong in case of bugs. Lagom was such a nice framework, coupled with Akka service discovery makes building Event Sourced application so simple.
- type0 7y agoTo me this is possibly the biggest attraction, Scala feels solidly build and still somehow manages to resemble the fun of using a scripting languages.
- stunt 7y agoYou mentioned PHP or Python, or Ruby devs. How was your experience on-boarding programmers with no Scala experience?
- hszeeks 7y agoIf you keep the Scala feature you use minimal, it should not get too complicated. First step was to learn SBT, which in itself is simple (building projects, dependencies, plugins). Later we have them do scala exercises (scala-exercises.org) to understand Scala basics, and the philosophy behind Scala, onboard on Framework (Play/Lagom). Then we move on to Slick, and then Future API, error handling with Try, for yield comprehension, map and flatMap, collections, and of course implicits. The rest would be comments on pull request.
- lihaoyi 7y agoI personally really like how this release turned out. Tons of polish, cleanup, simplification, and performance work. Basically tackling the core problems with the language, with minimal feature creep or additional complexity (I must admit to contributing to that creep in a small way)
- lmm 7y agoI guess there's always "one more feature", but to me it feels like Scala stopped frustratingly just short of getting the language design right. Partial type application is frustratingly cumbersome. For the last 3 releases or so - which is what, 6 years of language development? - people have been using the kind-projector plugin to the point that it's now pretty much entrenched. Any kind of built in solution - even if it were just bundling kind-projector into the compiler - would have been better for the ecosystem in terms of things like good compilation errors (which experienced users don't notice, but can be a major pain for newcomers). The situation for enums is even worse, with what must be a dozen competing libraries/macros/..., none of which manages to be as nice as Java's "enum" (to the extent that I actually write enums in Java when writing Scala). I get that everyone has their own preferences, but even if the solution was just to adopt the Java solution directly (but allow writing the body in Scala) that would be a huge advance from where we currently are. I love Scala but I really wish the developers had solved these two cases before, effectively, freezing development of new language features for 5 years and counting.
- lihaoyi 7y agow.r.t. type lambdas and enums, AFAIK they’re working on it. See https://contributors.scala-lang.org/t/announcing-dotty-0-16-0-rc3/3397/2 https://contributors.scala-lang.org/t/announcing-dotty-0-16-...
- pas 7y agoScala seems to be lacking sponsors and contributors. Since 2018-01-01 according to GitHub only 44 people committed to scala/scala. (Which naturally follows a power-law distribution, so half of those people only have one or a few commits.) And it's similar for the lampepfl/dotty repo (since 2018-01-01: 52 people, <10 active contributors) whereas the problem space is vast, the compiler is very intricate and brittle, the tasks at hand are many, and the language is complex, so trying any solution takes a lot of time and serious reviewing effort to try to make sure it doesn't cause any unintended problems. And at the same time there are a lot of actively maintained libraries/frameworks/tools, but the overlap of the maintainers of those with the compiler maintainers is significant. So all in all it's not surprising that things are not progressing super fast.
- amzans 7y agoI work at a major online fashion aggregator and my team uses Scala extensively for our search API (with Twitter's Finatra) and also in several of our data pipeline systems (Akka, Spark). When I joined a few years ago, I was honestly not most excited about working with Scala, but the more I got into it, the more I realised that Scala got a lot of things just right. In particular, I really miss working with the collections and futures API whenever I switch to another language. And it's overall a pretty good package: very predictable behaviour, easy to debug (IntelliJ Idea helps a lot here), fast runtime and high quality libraries available for pretty much anything you might need.
- skrebbel 7y agoI used Scala five-ish years ago, and I loved it, but I had two qualms: 1. The community was terribly split between FP purists who wanted to write Haskell on the JVM and pragmatists who leaned more towards the "better Java" side of things. Plus the occasional ex-Rubyists who came up with method names consisting solely of interpunction ("embedded DSL!"). Has any side won? It would be nice to have anything resembling "idiomatic Scala" out there. 2. The compilation times were horrid, really blocking a fast edit-compile-run(-tests) loop, often making my attention wander away etc. Has this improved sufficiently much that you can edit code, switch to the browser (or wherever) and pretty much immediately see the result?
- aphexairlines 7y agoCompilation times have improved substantially: https://scala-ci.typesafe.com/grafana/dashboard/db/scala-benchmark?orgId=1 https://scala-ci.typesafe.com/grafana/dashboard/db/scala-ben...
- nih0 7y agoInteresting that so many fashion companies use scala :)
- gtycomb 7y agofashion/media centers like NY have their own buzz even in technology. I remember back when Scala appeared, even Wall Street Journal running an article touting Scala as the next big happening in technology.
- turk73 7y agoAlt JVM languages have been dead since around 2013. Kotlin is hanging out because of Android. It is what it is. Former Groovy aficiando and Clojure refugee here.
- dmit 7y agoAnd all of them are Zalando. =)
- deleted 7y ago[deleted]
- gtycomb 7y agoThere may be something to what you say, speaking of newer generation fashion busineess that try a newer technology. As an architect in this area during one phase in my career, numerous fashion heavy weights ran SAP gobally. Oracle too must have a good footprint.
- AzzieElbab 7y agoReally liking this release. It trims off some confusing and redundant features while making substantial improvements in scala's bread and butter blocks - collections and futures. Type system changes are neat as well
- SOLAR_FIELDS 7y ago> Standard library: Future is faster and more robust. Elsewhere, useful classes and methods have been added. This is a pretty huge deal. Our backend API depends pretty much exclusively on these, and everything is wrapped in them. Performance enhancements for these will bubble into basically every Scala Play app.
- kekepepe 7y agoWe use Java in our projects and although there is interest in Scala, I fail to see any real benefits from moving to it, especially with new Java features, except for a nice addition to your CV. Can anyone share their experience where moving from Scala to Java yielded measurable benefits, besides "it's more fun to program in Scala"?
- didibus 7y ago"More Fun" has more implications on productivity, defect rates, and quality than you give it. You can't underestimate how much the motivation of developers and their enjoyment and engagement with a project, feature, or any given code change actually impacts the overall delivery. Now, if you don't find it more fun, more engaging and more motivating, disregard this. But my point is, any language, tooling, environment, team culture, etc., which will bring you "more fun" will actually make you deliver way better software as a side effect.
- namelosw 7y agoIt's sad to see Kotlin took over quite a share from Scala in my perspective. A lot of people are waiting for Scala 3 to make their decision which makes it worse. Don't get me wrong - Kotlin is a nice language. But Scala is one of the most language to bring novel ideas in to the industry. There will be even dependent type in Scala 3. A lot of people are keep bashing languages like Scala for complexity. I don't think they are wrong but in this way the industry is moving slow compared to the reckless style in 90s. People are just too caution with new languages nowadays, which makes things harder for new ones. New languages have to add a lot of compromises to get attraction. There's still a long way from carpentry to engineering.