Hi Benas,

Overall, I'm very much in favour of disallowing returning a value from
constructors.
However, I think the RFC should deal with the return value and the
signature validation
in the same time, so that we can vote about both, since introducing the
latter check
is not just a bug fix, it's a substantial change IMO.

What I would like to avoid for sure is that the void return type is not
actually enforced.
(Offtopic: It seems that the magic method signature RFC exactly does this,
and I'm not
happy about it. I'd welcome an amendment RFC to fix the new
inconsistencies).

Furthermore, I personally also like the concept of an explicit return type
declaration for
constructors, but Nikita's earlier argument against (that most languages
forbid the explicit
return type) makes me think. Anyhow, this counterargument might be worth to
add to the RFC.

And regarding the last section of the RFC (Backward Incompatible Changes),
I'm not exactly
sure what you mean there, but since constructors are exempt to LSP
validation, I think
it's ok if a child class overrides the parent constructor with a widened
return type.

Regards,
Máté

Reply via email to