Jesus, this is such a CF.  Can I not write understandable English?

read-only and write-only ENFORCE UPON SUBCLASSES that no setter or getter 
(respectively) can be defined.  That's all they do.  There is no currently 
proposed solution that meets this need.

This "NEED" was pulled from the original RFC that Dennis wrote some 4 years 
ago.  Perhaps we don't even NEED a solution to this problem.

> -----Original Message-----
> From: Stas Malyshev [mailto:smalys...@sugarcrm.com]
> Sent: Tuesday, October 16, 2012 5:59 AM
> To: Jazzer Dane
> Cc: Clint Priest; internals@lists.php.net
> Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2
> 
> Hi!
> 
> > I apologize for my confusing terminology - let me elaborate. There are
> > no special syntaxes. The below code should help clear things up a bit:
> >
> >     class MyClass {
> >       private $otherProperty;
> >       public $property {
> >         get() {}; // Does not "have a body", as there is no code between
> >     the curly braces.
> 
> It does have a body. This body is just default empty method body returning 
> null - which does not throw any exceptions and is
> completely indistinguishable from the outside from property being equal to 
> null.
> I'm not sure it's what the intent of *-only variable is, though I guess it is 
> a way to hack around it. I wonder however if it can be done
> better.
> 
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227

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

Reply via email to