Re: [RFC] Accessors : read-only / write-only keywords
| From: | Lester Caine | Date: | Sat, 20 Oct 2012 19:09:53 +0000 |
| Subject: | Re: [RFC] Accessors : read-only / write-only keywords | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-63570@lists.php.net to get a copy of this message | ||
Clint Priest wrote:
Hey Rasmus, please try and keep these replies in the appropriate thread... And bottom post please ...
I am in favor of eliminating the read-only/write-only keywords and implementing no "special code" to make what was read-only/write-only language enforced. I think the alternatives with final are just fine and good enough and will let userland programming enforce it if they so desire. But the question still remains. Isn't a read only variable simply a 'const'? Why do we need anything more than that? It explains exactly why it has been defined without any ambiguity and works everywhere.write-only is a more 'specialist' concept as you need information back to confirm that it has been set, or if there was an error. Simply writing a value blind makes no sense? -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk