Would the following two be exactly functionally equivalent?
public Foo $foo;
public $foo {
get;
set(Foo $value) { $this->foo = $value; }
}
We should also consider how an author would allow type-hinted properties to
accept NULL as a new value, in both proposals.
Steve
--
http://www.mrclay.org/
On Jan 4, 2013, at 9:41 AM, Nikita Popov <[email protected]> wrote:
> Hi internals!
>
> I already brought this up before, but I think the discussion at that time
> was not very constructive and largely off-topic, so I'm bringing it up
> again. To make sure everything is clear I wrote an RFC document:
>
> https://wiki.php.net/rfc/propertygetsetsyntax-alternative-typehinting-syntax
>
> This RFC proposes an alternative syntax for typehinting accessors, which
> will in particular also allow to typehint properties directly, even if no
> accessors are used (public DateTime $date).
>
> What are your opinions on this?
>
> Thanks,
> Nikita
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php