mojo icon indicating copy to clipboard operation
mojo copied to clipboard

[mojo-stdlib] Make use of variadic initializer for `List` where applicable

Open JoeLoser opened this issue 10 months ago • 4 comments

Review Mojo's priorities

What is your request?

For example, replace things like

var l = List[String]()
l.append("one")
l.append("two")
l.append("three")

with

var l = List[String]("one", "two", "three")

This is a bit shorter and easier to read. One such example is here

What is your motivation for this change?

Using new standard library constructor for List to simplify/shorten existing code.

Any other details?

No response

JoeLoser avatar Mar 29 '24 00:03 JoeLoser