Re: [RFC Discussion] Typed Properties

From: Date: Sat, 19 Mar 2016 11:02:21 +0000
Subject: Re: [RFC Discussion] Typed Properties
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-91771@lists.php.net to get a copy of this message
On 3/19/2016 11:54 AM, Lester Caine wrote: > On 19/03/16 10:23, Fleshgrinder wrote: >> Properties need the ability to be void even after construction and it is >> up to the object to keep track and ensure state. Nullability is imho not >> necessary at all. So we are all in line here. > > If the record I am working with identifies elements are incorrectly > matched, then making a value 'void' is the correct action. We would just > NULL that identifier and fire off a delete to the linked record in the > database. Otherwise we have to create additional logic to handle that. > And *void* would translate to *unset($record->property)* and not to *$record->property = null*. This works with the current implementation and any *isset($record->property)* works too. As you can see, nullability was not required. :) -- Richard "Fleshgrinder" Fussenegger

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.internals (#91771) next »