by syspec · 8y ago · 0 comments
Wait, not typing new accomplishes all those amazing things? Here i thought it was just three letters, which showed intent - hence easier to grok the surrounding code
Container(
child: Column(
children: [
Text("One"),
Text("Two"),
Text("Three"),
]
)
)
It's not major but I don't think your quote is overselling it either. It is a quality-of-life change that does those things.There was some concern that removing "new" would make it less obvious that an object was being constructed. In practice, though, it's been totally fine. The fact that the thing you're invoking is a class (and hence a capitalized name) seems to be sufficient signal that "you're making an object".
Also, several other languages already work this way: Python, Scala, Kotlin, etc.