for Scala contributions, language evolution discussions, standard library evolution discussions, and so on| Scala Contributors
This now has a PR implementation in SIP-72: WIP dedented triple-quoted string literals by lihaoyi · Pull Request #24185 · scala/scala3 · GitHub| Scala Contributors - Latest posts
refs: https://www.youtube.com/watch?v=hcWKRfRR-7Y| Scala Contributors - Latest posts
fewer braces every day - sometimes still useful to use curlies around a long closure. Other notes - i don’t get bothered if there is a mix of braces/no braces| Scala Contributors - Latest posts
I’m a bit late to this thread, but I have a few historical and current items to add. A few years back, we noticed some performance issues with instanceof checks for interfaces in tight loops in the Scala collection library and worked around by switching to a virtual call. The original performance bug and analysis was reported by the Spark team in: Major performance bottleneck in scala.collection.mutable.Builder · Issue #9823 · scala/bug · GitHub We eventually linked this back to: https:/...| Scala Contributors - Latest posts
This thread is for updates and discussions about the eventual Scala 2.13.18 release. As of yet, we don’t know much about the release’s likely contents or timing. If no followup to 2.13.17 needs to be rushed out, then a typical timeframe might be 3–6 months. Let’s use this thread to ask, propose, discuss.| Scala Contributors - Latest posts
I’m gonna chime in with my experience with this syntax in somewhat similar language. I use this syntax very frequently in Lean. It’s a pretty common case that I have two enums with cases of the same name. Without the syntax that Lean allows, I would have to add a prefix (like in haskell) or use the name of the qualified name. If you have an enum for each step of some data processing pipeline (like a compiler for example), you would want adjacent data models both in scope. Also, when you c...| Scala Contributors - Latest posts
That is a warning behind the flag -Xlint:infer-any. Probably it needs a tweak, or a different name.| Scala Contributors - Latest posts
Hi all, first time posting here! (*) I would like to propose the idea of a community poll to have some actual datapoints regarding the effectiveness and usefulness of SIP 44, rather than implementing a patch for it. SIP 44 had been a controversial enhancement that caused quite some debates among Scala devs in the past, and had a rough start due to IDE like IntelliJ or LSP (metals) having difficulties to support it properly, tools like scalafix/scoverage having a late adoption, and IDE feature...| Scala Contributors
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
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 ...| Scala Contributors
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
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