RE: [PHP-DEV] [RFC] Propety Accessors v1.1
| From: | Pierre Joye | Date: | Thu, 11 Oct 2012 05:04:47 +0000 |
| Subject: | RE: [PHP-DEV] [RFC] Propety Accessors v1.1 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-63337@lists.php.net to get a copy of this message | ||
On Oct 11, 2012 5:00 AM, "Clint Priest" <cpriest@zerocue.com> wrote:
>
> Why is everyone so dead set against read-only and write-only?
>
> I could not disagree more with you on what is "pretty" and "readable".
>
> To me:
>
> public read-only $hours {
> get { ... }
> }
>
> Is infinitely more readable and understandable than:
>
> public $hours {
> get() { ... }
> private final set($value) { ... }
> }
Fully agreed. It is obvious and clear like water.
Cheers,
Pierre