> But often classes need constructors only to set properties. In such cases,
> constructors become redundant.
Actually, the behavior is not the same and the constructors are not redundant.
Taking your example:
```
class Person
{
public string $firstName;
public int $age;
}
$person = new
>
> $person = new Person("Name", 43) {
>
firstName: "John",
>
age: 42
>
};
Hi!
You could achieve similar functionality with a simple user-land method
"assign". If you put such a method on a trait, you can use it everywhere.
See the example:
$propVal) {
$this->$prop
Hi Internals,
I would like to discuss the possibility of assigning multiple public
properties at once during the class initialization.
Currently, with constructor property promotion we've already achieved the
ability to skip a lot of boilerplate code. With property accessors (aka
hooks) we could r