I think:
data Point3D(x, y, z) from Vector: ...
is a terrible syntax, there are plenty of legitimate use cases where you'd have an overwhelming amount of fields in a class/structure, and listing them line by line (as well as explicitly specifying accessors to handle the couple special cases) would end up much more readable. I'd rather see something more along these lines: data Parrot(Animal):
name
age: int
alive: bool = False
purchased_in: Shop | None = field(default_factory=get_shop)
...
(Move "field" to builtins, etc.)But overall this proposal seems like a no-brainer, even before the addition of the match statement. The "classic" __init__ is a jarring violation of DRY, baked right into one of the most common idioms in the language, and gets in the way of not just the "QoL" features like destructuring or type checking, but also of the efforts to build more efficient implementations that could pre-allocate object memory without speculative analysis, or optimise the dict lookup away.
The question is not "shall we", but "why wasn't it done in 2008".