Re: supporting the final keyword for properties
| From: | Pierre Joye | Date: | Mon, 16 Jul 2012 13:42:19 +0000 |
| Subject: | Re: supporting the final keyword for properties | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-61297@lists.php.net to get a copy of this message | ||
hi,
On Mon, Jul 16, 2012 at 2:25 PM, Ferenc Kovacs <tyra3l@gmail.com> wrote:
> The recent
> http://www.mail-archive.com/internals@lists.php.net/msg59301.html
> discussion
> made me wonder why did we decide not supporting the final keywords for
> properties as it would provide an easy way for read-only attributes (const
> would be a better choice in performance wise, but then you can only set it
> in your declaration where no dynamic expression is allowed.)
Final and readonly are too totally different concepts.
Read only properties can be implemented by doing something using the
nice getter/setter RFC
(https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented).
Cheers,
--
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org