scala / collection-strawman

Implementation of the new Scala 2.13 Collections
Apache License 2.0
200 stars 72 forks source link

collection.Set no longer has a varargs + method #540

Closed lrytz closed 6 years ago

lrytz commented 6 years ago

https://github.com/scala/collection-strawman/commit/87b27654d4a5bc811ec957114316f8c596733ec1 added a deprecated + method to collection.Set (also suggested in https://github.com/scala/collection-strawman/issues/375), but only a version taking a single parameter. In 2.12 there's an overload with varags, allowing s + (1, 2, 3). Should we add that (deprecated) overload?

lrytz commented 6 years ago

While we're at it: 2.12 also provides - (two overloads, one with varargs), and --.

lrytz commented 6 years ago

(and for collection.Map)

szeiger commented 6 years ago

Also see https://github.com/lampepfl/dotty/pull/4311. We shouldn't use varargs for symbolic operators going forward but it's OK for deprecated methods.