As Scala 3 allows to call constructors without using
new, I tried to remove all the
new keywords in a project of mine. However, I ran into a couple of issues:
- Objects cannot be constructed from type aliases without
mutable.HashSet[Int]()is not the same as
new mutable.HashSet[Int]: The former builds from varargs, so creates a sequence and a builder.
nan integer) won’t compile without the
I conclude that there are some loose ends. However, it is not clear to me what is intentional behavior, what is a bug, and whether some changes to the language and/or the standard library may be necessary to improve user experience.