Good hint, Nikita.
I like the feature of automatic properies. For the problems with unauthorized 
access: What about signing automated generated "variables", so that they are 
only accessable through the property?

@Lester Caine: This properties do not break backward compatibility. If you do 
not want to use it, you do not need.
I like them because they offer an easy, short and well readable way to 
protected object or class variables.

Best regards
Christian Stoller


-----Original Message-----
From: Nikita Popov [mailto:nikita....@gmail.com] 
Sent: Friday, October 12, 2012 12:48 PM
To: Clint Priest
Cc: internals@lists.php.net
Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

On Fri, Oct 12, 2012 at 7:23 AM, Clint Priest <cpri...@zerocue.com> wrote:
> Alright, here is the updated RFC as per discussions for the last few days:
>
> https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented
>
> If you could read it over, make sure I have all of your concerns correctly 
> addressed and we can leave this open for the two week waiting period while I 
> make the final code changes.
>
> -Clint

I've been thinking a bit about the automatic properties again, and
noticed that I forgot to name one use case: Asymmetric accessor
visibility. Automatic properties may be useful in that context, so
that you can write "public $foo { get; protected set; }" (though they
don't necessarily need to be implemented as properties with auto
generated code, rather just properties with more detailed visibility
handling [a bit related to the stuff Amaury has been saying]).

Nikita

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to