Nikita brought up a good point:
There aren't all that many scripts that use final methods, which could very
well be the same fate for final property accessor methods.

Due to the very possible unpopularity of whatever magic syntax/keyword we
could potentially come up with, we *could *alternatively trash any magic
read/write-only keywords/syntax and just allow people to manually throw a
read-only exception.

Opinions?

On Sat, Oct 20, 2012 at 3:15 AM, Pierre Joye <pierre....@gmail.com> wrote:

> On Sat, Oct 20, 2012 at 1:07 AM, Clint Priest <cpri...@zerocue.com> wrote:
> > I had thought of a deviation on some of the ideas presented to get rid
> of read-only/write-only while still keeping the ability to maintain their
> effect, if we so decide that the feature is wanted.  Here it is:
> >
> > class TimePeriod {
> >     private $Seconds;
> >
> >     public $Hours {
> >         get() { return $this->Hours; }
> >         final set NULL;
> >     }
> > }
> >
> > It's close to what's been suggested but is pretty clear that there IS NO
> SETTER it could not be called within the class and since its final it
> cannot be over-ridden.  I've included this in the change tracking document.
> >
> > Thoughts?
>
> Sorry but I don't like it, it makes me think that there is no setter
> but I could set the property manually (yes, that's not an actual one
> but putting myself in the shoes of a lambda user).
>
> I actually prefer the read-only syntax, while we have to make it clear
> and not confusin (see Niki's reply in this post).
>
> Cheers,
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Reply via email to