Re: [RFC Discussion] Typed Properties

From: Date: Sat, 19 Mar 2016 10:48:52 +0000
Subject: Re: [RFC Discussion] Typed Properties
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-91769@lists.php.net to get a copy of this message
On 3/19/2016 11:38 AM, Björn Larsson wrote: > Den 2016-03-18 kl. 21:12, skrev Fleshgrinder: >> No worries you are not, not at all. I just wanted to thwart you and >> others in directly assigning ... >> >> final class A { >> int $x; >> } >> >> ... to be *public* and obstruct the opportunity of assigning it a >> meaningful new functionality. >> > Well, but if one should assign int $x without visibility keyword a > meaning, shouldn't it be the same as for function y() {} without > keyword, i.e. public? > > Of course one can change both, but that sounds like a 8.0 topic. > > Regards //Björn > > It is a sad state the implicit public properties use *var* and implicit public methods nothing, this makes the introduction of new visibility modifiers terribly complicated. You are completely right, they should be the same and *var* should be banned. It is consistent and that is very important. I cannot and do not want to argue against this. Yet at the same time the lack of access (and additional visibility) modifiers is what I am missing the most. Seems as if this has to wait for 8.0 (or 9.0, depending on the resistance). :( -- Richard "Fleshgrinder" Fussenegger

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.internals (#91769) next »