Collection constructor should allow to set initial values #6319
Labels
domain:dx
This issue reports a developer experience problem or possible improvement.
package:utils
type:improvement
This issue reports a possible enhancement of an existing feature.
Milestone
📝 Provide a description of the improvement
Currently the only way to set collection value is to keep calling
.add()
for each value.It should be possible to initialize it with an iterable object. That's both convenient and sometimes more efficient in terms of performance.
There's also a similar ticket asking to allow adding multiple values using
.add()
at once #4992.📃 Other details
Required by #6194.
There's a nice PR that adds this together with the
add()
function which I'll base upon for solution to this issue - stripping stuff that is not needed for this fix.If you'd like to see this improvement implemented, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: