Re: PHP7 and types

From: Date: Tue, 14 Jul 2015 15:26:37 +0000
Subject: Re: PHP7 and types
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-87170@lists.php.net to get a copy of this message
On Tue, Jul 14, 2015 at 3:51 AM, Sebastian B.-Hagensen <sbj.ml.read@gmail.com> wrote: > 2015-07-14 11:05 GMT+02:00 S.A.N <ua.san.alex@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).

« previous php.internals (#87170) next »