Re: supporting the final keyword for properties

From: 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 [email protected] to get a copy of this message
hi,

On Mon, Jul 16, 2012 at 2:25 PM, Ferenc Kovacs <[email protected]> wrote:

> The recent http://www.mail-archive.com/[email protected]/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


Thread (20 messages)

« previous php.internals (#61297) next »