Re: [PHP-DEV] Re: [RFC] [Vote] Short Ternary Assignment Operator

2016-04-12 Thread Sara Golemon
Took me awhile to get back around to this problem, but this version feels okay. https://github.com/php/php-src/compare/master...sgolemon:short-ternary.coalesce It's less efficient than earlier versions, but no worse than the current `A = A ?: B` syntax (which is effectively what it does, with the

Re: [PHP-DEV] Re: [RFC] [Vote] Short Ternary Assignment Operator

2016-03-25 Thread Sara Golemon
On Fri, Mar 25, 2016 at 6:44 AM, Nikita Popov wrote: > I don't think the current implementation is entirely correct. In particular, > it doesn't look memory-safe to me. You're doing an RW fetch on the LHS > first, then evaluate the RHS expression and then ASSIGN to the result of the > RW fetch. Th

Re: [PHP-DEV] Re: [RFC] [Vote] Short Ternary Assignment Operator

2016-03-25 Thread Nikita Popov
On Fri, Mar 25, 2016 at 4:25 AM, Sara Golemon wrote: > On Thu, Mar 24, 2016 at 11:12 AM, Sara Golemon wrote: > > After some discussion (and realizing the referenced implementation > > needed more work that a simple replacement of tokens), I've decided > > the close this vote, work with Midori on

[PHP-DEV] Re: [RFC] [Vote] Short Ternary Assignment Operator

2016-03-24 Thread Sara Golemon
On Thu, Mar 24, 2016 at 11:12 AM, Sara Golemon wrote: > After some discussion (and realizing the referenced implementation > needed more work that a simple replacement of tokens), I've decided > the close this vote, work with Midori on both implementations some > more, and reopen at a later time w

[PHP-DEV] Re: [RFC] [Vote] Short Ternary Assignment Operator

2016-03-24 Thread Sara Golemon
After some discussion (and realizing the referenced implementation needed more work that a simple replacement of tokens), I've decided the close this vote, work with Midori on both implementations some more, and reopen at a later time with a complete implementation (possibly combined with ??=) On