We are pleased to announce version 1.12.0 of ekrich/sconfig. I apologize in advance if people get deprecation warnings. The release is binary compatible. We released formatting support “under the radar” in the last release. We hope to eventually have support in tools to allow formatting of your config files. This feature was added by Waldemar Wosiński and enhanced in this release. We also have updated the library to include many of the fixes and features added previously in the Java vers...| Scala Contributors - Latest posts
In Rust, we can use .. when matching on tuples. I found it is quite useful when matching on large tuples.| Scala Contributors - Latest posts
Given that the last comment in this thread was back in March, it might have been missed that in April, Oracle Labs announced an official Java-to-WASM backend for GraalVM Native Image. This is a significant development, as it effectively covers most (if not all) WebAssembly compilation use cases for Scala and other JVM languages, including JavaScript interoperability and, more importantly, enterprise-grade support. Source: The Future of Write Once, Run Anywhere: From Java to WebAssembly | Wasm...| Scala Contributors - Latest posts
Scala 3.7.4-RC1 is now ready for testing! The previously unplanned 4th patch release of Scala 3.7 brings most of backward compatible improvements and bugfixes originally planned for 3.8 which (as last minor before planned feature freeze for 3.9 LTS) requires a bit more work from compiler team. Release highlights: improvements to coverage making it’s results more similar to Scala 2 under -Yexplicit-nulls compiler now warns for inferred flexible types to prevent binary incompatibilies backpor...| Scala Contributors - Latest posts
SIP-70 - Flexible Varargs is now implemented in nightlies as an experimental feature, available via the language import import language.experimental.multiSpreads People are encouraged to experiment with it and give feedback.| Scala Contributors - Latest posts
An update: SIP 71 has been accepted for inclusion in the language at today’s SIP meeting. I expect it will land in -preview mode in Scala 3.8 and as a regular feature in Scala 3.9.| Scala Contributors - Latest posts
For now we’ll go with the nesting. If there are strong concerns, it would be trivial to disallow it. The proposal now also covers this case, discovered by @prolativ: fun: (x: Int) => (y: Int) => x + y That is currently disallowed, but will be allowed under the proposal.| Scala Contributors - Latest posts
Hi all, we are planning to release 3.3.7-RC2 with the requested changes, so the final release date for 3.3.7 will we postponed at least a week. The changes will include improvements to coverage and some presentation compiler fixes.| Scala Contributors - Latest posts
I wanted to write something like the following: trait Ctx object Ctx: val default: Ctx = new Ctx {} def foo(arg: Int)(using ctx: Ctx = Ctx.default): Unit = {} def foo(arg1: Int, arg2: Int)(using ctx: Ctx = Ctx.default): Unit = {} //error: two or more overloaded variants of method foo have default arguments I want both foos to have a default values for their contexts, but I’m currently limited since I get the overloading ambiguity error. Why isn’t overloading ambiguity checked on a block-b...| Scala Contributors - Latest posts
Earlier this year we built an integration between scalamock classic and ZIO Test. After writing more than 400 tests with this integration on a large production codebase, we contributed the work to open source — and it is now part of scalamock itself. As of version 7.5.0, scalamock classic has first-class support for ZIO Test. Release notes: scalamock 7.5.0 Why this was needed The now-deprecated zio-mock was a source of frustration for many developers and also a blocker for Scala 3 migration...| Scala Contributors
Summary This proposal is to allow a lambda expression following a : on the same line. Currently, we need a newline and indent after the arrow, e.g. xs.map: x => x + 1 We propose to also allow to write the lambda on a single line: xs.map: x => x + 1 The lambda extends in this case to the end of the line. History This feature has been demanded repeatedly since the colon-lambda syntax was introduced as part of SIP 44, for instance see a recent thread in Scala Users. The original SIP 44 did not i...| Scala Contributors - Latest posts
Is it not too difficult to make it so val range: NumericRange.Inclusive[Long] = Long.MinValue to Long.MaxValue range.contains(Random.nextLong()) always returns true instead of throwing an Exception? Is it not too difficult to make it so val intersect = (Long.MinValue to 1L).intersect(-1L to Long.MaxValue) intersect.contains(0) returns true instead of throwing an Exception?| Scala Contributors - Latest posts
JDK 25 is GA now. We don’t yet have a planned date for a 2.12.21 release, but JDK 25 support has been merged on our 2.12.x branch, so users may consider using a nightly build.| Scala Contributors - Latest posts
Hi, I was hoping until recently that SIP-47, i. e. “Clause Interleaving” would make the “PartiallyApplied” pattern obsolete. Unfortunately I have since found out that it doesn’t. The problem For those who don’t know: this pattern makes it possible to have a method with more than one type parameter where some can be inferred from the arguments passed and others can’t. An example is the Kleisli.fromFunction method in the cats library library. It conceptually takes three types para...| Scala Contributors
Hi! I am using explicit capture polymorphism for a project heavily, and I am trying to use capture set type variables and self-type to define a type that captures something without storing it. As an example, something like this should work in my understanding of capture sets and self-type: class A[CS^]: self: A[CS^]^ => end A @main def main(): Unit = val a: A[{}]^ = A[{}] // should be `A[{cap}]` but the compiler didn't allow it val b = A[{a}] I am expecting the compiler to infer that A...| Scala Contributors
Seems like the current Scala 2 specialized generates too many classes| Scala Contributors
filed as compiler plugins able to register with the Reporter · Issue #329 · lampepfl/dotty-feature-requests · GitHub| Scala Contributors
I don’t think this is a good analogy, (hence why it seems counterintuitive) I think a better analogy would be " 's " in english: Mike’s red ↔ Mike.Red, in that way, a prefix period is like using “one’s”, “someone’s” or “his”: his red ↔ .Red In that light, it makes a lot more sense, and feels more intuitive Maybe we could add something instead of removing the period, to be more in line with “his”, for example *.Red, ?.Red or ...Red (But regardless, I am not sure eit...| Scala Contributors
I started winding down the PR queue for 2.13.16, reassigned most PRs and tickets to the next milestone. There’s still a bit of time to get something in (in particular there are a copule of open tickets for tasty reader). We might start working on the release in about two weeks.| Scala Contributors - Latest posts
Submitted another Pre-SIP. Please take a look! This Pre-SIP formalizes the discussion we had in the earlier thread "Unpacking" classes into method argument lists into one coherent proposal| Scala Contributors
JEP 502 introduces the StableValue api (previously known as ComputableConstant). The api can be used to create constants with delayed (at-most-once) initialisation. The unique selling point of this api is that the JIT will trust the values for constant folding. At a glance, this api seems like the perfect compilation target for Scala’s lazy vals. I can imagine two benefits over the current compilation strategy: Simpler generated code; the whole ‘checking whether a lazy value is already in...| Scala Contributors
A syntax for aggregate literals Hey there, this thread was born out of a recent discussion on the Scala Discord. Motivation Unlike most other programming languages today like EcmaScript or C++, Scala does not have a literal syntax for collections and objects. It makes up for this with (potentially variadic) apply methods on the relevant types’ companion objects, e. g. List(1, 2, 3) or SomeCaseClass("foo"). This works, but it means that it is often necessary to spell out the name of a type (...| Scala Contributors
Pre-SIP: A Syntax for Collection Literals Scala is lacking so far a concise way to specify collection literals. This makes it an outlier compared to many other popular languages. We propose to change this by introducing a special syntax for such literals. The syntax is quite conventional: A sequence is written as a comma-separated list of elements enclosed in square brackets. For instance, here is a diagonal matrix of rank 3: [[1, 0, 0], [0, 1, 0], [0, 0, 1]] This pre-sip is a follow-...| Scala Contributors