Re: RFC: Property get/set syntax

From: Date: Fri, 20 Apr 2012 13:13:47 +0000
Subject: Re: RFC: Property get/set syntax
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On 2012-04-20, Christoph Hochstrasser <[email protected]> wrote:
> Hi, 
> > Are the dashes acceptable or undesirable?
>
> I think without dashes it is more in line with other keywords, like
> "instanceof" or "insteadof". 
>
> Because keywords are not case sensitive, one who likes them to be more
> readable could write them camelCased, for example "readOnly", or
> "writeOnly".

If they are to be keywords, I'd argue we should use the dash variant --
the reason being that with the dash, there can be no conflict with
existing constant, variable, or function names. I know I've had a fair
number of each named both "readonly" and "writeonly".

-- 
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc


Thread (12 messages)

« previous php.internals (#60230) next »