In addition to the standard `+` operator, should t...
# language-proposals
d
In addition to the standard
+
operator, should there be a way to implement a more efficient multi-plus method? Such as
operator fun <E> Set<E>.plusAll(vararg others: Iterable<E>): Set<E>
? Currently,
setA + setB + setC
will first create an intermediate
setAB
set, so one must use something like:
Copy code
buildSet {
    addAll(setA)
    addAll(setB)
    addAll(setC)
}
to avoid the inefficiency, which is a fair bit more code to achieve the same result.