Re: C# properties vs. accessors RFC

From: Date: Wed, 23 Jan 2013 21:51:59 +0000
Subject: Re: C# properties vs. accessors RFC
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-65130@lists.php.net to get a copy of this message
Hello Levi,
Agreed, but if they are automatically generated then I see no harm in allow custom isset and unset behavior as long as it doesn't get in the way or complicate things.
If override of isset/unset is possible, we will end up debugging:
    true === isset($this->someUninitializedValue)
or
    unset($this->memoryConsuming); // with no effect
What is the benefit of this?
I also don't like the ? for nullable. Just stick with PHP convention and do:
     class Foo {
         public Bar $bar = NULL;
     }
There is no such PHP convention. The PHP convention is *not restrict type* (+"loosely typed" addons). So NULL is automatically allowed. cryptocompress

« previous php.internals (#65130) next »