There are two previous topics which I think should be scanned for things we have already discussed about the possible Scala 3 specific stdlib improvements:
Scala 3.4 introduces warnings on alphanumeric method application in infix positioning if such methods are not explicitly marked with infix.
I think equals should be marked as infix, as it is naturally used in infix positioning.
Do you agree? What other stdlib functions/types do you think should be marked as infix?
Related issue:
Some parts of stdlib could be greatly ehanced by using Scala 3 specific features. One example is ChainingSyntax. Just consider:
extension [A](self: A):
inline def tap[U](inline f: A => U): A =
f(self)
self
inline def pipe[B](inline f: A => B): B = f(self)
Using inline here is not only more efficient, it also makes debugging more reliable (no lambdas), exception callstacks shorter and tidier and it e.g. makes return statemens from inside possible, as they are no longer non…
2 Likes