scala-library-next icon indicating copy to clipboard operation
scala-library-next copied to clipboard

backwards-binary-compatible Scala standard library additions

Results 69 scala-library-next issues
Sort by recently updated
recently updated
newest added

We now have several PRs that seem mergeable. But I think we should probably hold off on actually merging any PRs here until we have some kind of signoff process....

When debugging/inspecting code with timeouts/ellapsed times/etc using FiniteDuration seeing `2068493 seconds` is not ergonomic, and in most cases unhelpful. I suggest adding either of these things (or even everything): -...

Transferred from https://github.com/scala/bug/issues/11697 LinearSeqOps isEmpty, head, tail are nominally abstract, but inherit concrete implementations that are broken. It's not currently possible to enforce that these methods are overridden in subclasses...

Hey there. Have a nice day by contributing to Scala! Perhaps, I'll ask kinda annoying a heavily discussed previously question, but do you mind adding safe counterpart methods for collections?...

I miss having a form of `filter` that takes a partial function. It feels really natural to me to be able to write ``` List(1, 2, 3, 4, 5, 6).filter...

enhancement
library:collections
status:pending

```scala import scala.util.control.Exception.* extension (s: String) def toBigDecimal: BigDecimal = BigDecimal(s) def toBigDecimalOption: Option[BigDecimal] = catching(classOf[NumberFormatException]).opt(toBigDecimal) ``` I can make a PR if this is something that would be accepted.

Maybe there is a naming convention to indicate a preference for: - status quo (arbitrary sequences) - multiset result - filter of current sequence (so if I want 2x, 1y,...

I personally always call `toList` after a `split` since I don't like using `Arrays` for multiple reasons. Additionally, this implementation should be way more efficient than the current approach. And,...

It appears we lack a combinator to create `IndexedSeq[A]` backed by a size and a user-supplied function `Int => A`, eg ``` def fromFunction[A](n: Int, f: Int => A) =...

Add implementations for `Set`s backed by `Map`s (and corresponding factories). Add fluent `fromMap` APIs to `Set` companions. Motivation: - It should be first-class - Java has it, why don't we?

enhancement
library:collections
status:pending