Re: [PHP-DEV] [RFC] [VOTE] Typed properties v2

2018-09-21 Thread Rasmus Schultz
On Thu, Sep 20, 2018 at 4:50 PM Levi Morrison wrote: > > This will be my last reply to this thread. Fundamentally: > > class User { > public ?int $id; > public ?string $preferred_name; > public ?string $username; > } > > ^ This permits null properties at all times. This is acceptab

Re: [PHP-DEV] [RFC] [VOTE] Typed properties v2

2018-09-21 Thread Lester Caine
On 21/09/2018 08:58, Rasmus Schultz wrote: No matter how you twist it, uninitialized is the new null. I'm fine with unintialized as an implementation detail that ensures you can't read from properties while the constructor is busy establishing the invariant. I'm not at all fine with unintialize

Re: [PHP-DEV] [RFC] [VOTE] Typed properties v2

2018-09-21 Thread Rowan Collins
On Thu, 20 Sep 2018 at 16:52, Larry Garfield wrote: > I think the distinction here is that one group is arguing for "state of > the > data assertions" while the RFC as implemented is "setter assertion > shorthand". > That is, it doesn't assert that a value IS a given type, but that it can > only

Re: [PHP-DEV] Add FILTER_VALIDATE_INCLUDE validation filter for variable includes

2018-09-21 Thread Andrey Andreev
Hi, On Thu, Sep 20, 2018 at 11:30 PM, Arnold Daniels wrote: > > > On Thu, Sep 20, 2018 at 8:50 PM Andrey Andreev wrote: >> >> Hi again, >> >> >> On Thu, Sep 20, 2018 at 5:29 PM, Arnold Daniels wrote: >> > >> > Variable includes have proper purposes, like for a (PSR-4) autoloader. >> > This >> >

Re: [PHP-DEV] Add FILTER_VALIDATE_INCLUDE validation filter for variable includes

2018-09-21 Thread Rowan Collins
Hi Arnold, Please remember to click "Reply All" / "Reply List" rather than just "Reply", to make sure the list is included in your replies. Right now, most of us are only seeing half the conversation: https://externals.io/message/103196 Cheers, -- Rowan Collins [IMSoP]

Re: [PHP-DEV] Add FILTER_VALIDATE_INCLUDE validation filter for variable includes

2018-09-21 Thread Andrey Andreev
Hi, On Fri, Sep 21, 2018 at 3:03 PM, Rowan Collins wrote: > Hi Arnold, > > Please remember to click "Reply All" / "Reply List" rather than just > "Reply", to make sure the list is included in your replies. Right now, most > of us are only seeing half the conversation: > https://externals.io/messa

Re: [PHP-DEV] Unbundle libsqlite3?

2018-09-21 Thread Christoph M. Becker
On 19.09.2018 at 19:57, BohwaZ wrote: > On Wed, 19 Sep 2018 19:41:11 +0200 / "Christoph M. Becker" > said : > >> PR #2698[2] seems to require an RFC. IMHO, it's best to present RFCs >> and voting on them as early as possible (instead of rushing them at >> the last moment). :) > > Yeah there wa

Re: [PHP-DEV] [RFC] [VOTE] Typed properties v2

2018-09-21 Thread Larry Garfield
On Friday, September 21, 2018 4:20:20 AM CDT Rowan Collins wrote: > On Thu, 20 Sep 2018 at 16:52, Larry Garfield wrote: > > I think the distinction here is that one group is arguing for "state of > > the > > data assertions" while the RFC as implemented is "setter assertion > > shorthand". > > Tha

Re: [PHP-DEV] [RFC] [VOTE] Typed properties v2

2018-09-21 Thread Rowan Collins
On Fri, 21 Sep 2018 at 15:11, Larry Garfield wrote: > Perhaps another disconnect here is that, in practice, the consumer of an > object property is, in my experience, almost always "me". I almost never > have > public properties on my objects. On the rare occasion I do, it's for a > "struct obj

Re: [PHP-DEV] [RFC] [VOTE] Typed properties v2

2018-09-21 Thread Rasmus Schultz
On Fri, Sep 21, 2018 at 10:24 AM Lester Caine wrote: > Ignoring the debate on uninitialized/null ... not all objects ARE > invariant hence nullable types. > and there are very good reasons for not setting values for > everything, but it seems that these types of object are deemed to be > 'bad c

Re: [PHP-DEV] [RFC] [VOTE] Typed properties v2

2018-09-21 Thread Christoph M. Becker
On 21.09.2018 at 17:25, Rasmus Schultz wrote: > this doesn't provide *any* additional guarantees: > > class Foo { > public int $bar; > } > > $foo = new Foo(); // invalid state allowed > > $foo->bar = 123; // valid state > > $foo->bar = null; // invalid state NOT allowed?! > > [snip] > > In

Re: [PHP-DEV] [RFC] [VOTE] Typed properties v2

2018-09-21 Thread Larry Garfield
On Friday, September 21, 2018 10:25:50 AM CDT Rasmus Schultz wrote: > On Fri, Sep 21, 2018 at 10:24 AM Lester Caine wrote: > > Ignoring the debate on uninitialized/null ... not all objects ARE > > invariant > > hence nullable types. > > > and there are very good reasons for not setting values fo