Re: [RFC] Accessors : read-only / write-only keywords

From: Date: Sat, 20 Oct 2012 10:37:12 +0000
Subject: Re: [RFC] Accessors : read-only / write-only keywords
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-63562@lists.php.net to get a copy of this message
2012/10/20 Nikita Popov <nikita.ppv@gmail.com> > Could you maybe explain where exactly "const" would be used? > Well "const" and "read-only" have the exact same meaning. You can replace one by the other. So why create a new keyword? > Please > don't forget that we do not use your "foo:bar" syntax, so where would > the "const" go with the currently used syntax? > Don't be rude. It's not a "foo:bar" syntax sent no matter how on this mailing-list. It was an argumented RFC proposal, with an associated patch (but yeah, who cares?). If you want to give it a silly nickname, I'd prefer "public:private". :-) The RFC was: public read-only $a { get { return $this->_a; } } It could be: public const $a { get { return $this->_a; } } Is it so different that it needs a new keyword?

« previous php.internals (#63562) next »