On Tue, Jul 14, 2015 at 3:51 AM, Sebastian B.-Hagensen <sbj.ml.r...@gmail.com> wrote: > 2015-07-14 11:05 GMT+02:00 S.A.N <ua.san.a...@gmail.com>: >> Maybe implement getter/setter as ECMAScript 6? >> >> class Person >> { >> get name ():string { return $this._name } >> set name (string $value) { $this._name = $value } >> } > > Which was rejected some time ago. (34 vs 22 in favor): > https://wiki.php.net/rfc/propertygetsetsyntax-v1.2 > > Maybe it's time to reevaluate the proposal and see if a new > implementation could gather > more support.
I personally voted no on that proposal because of the proposed syntax and semantics. However I do like the idea of getters and setters and definitely prefer a Dart-like syntax (which is where ECMAScript basically got its syntax). -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php