Re: [PHP-DEV] Re: [RFC Proposal] Null Coalesce Equal Operator

2016-04-11 Thread S.A.N
Maybe even more sugar? :)

getValueFromDB();

 // Methode getValueFromDB() called, if $value not transmitted or null value
 public function __construct($value ??= $this->getValueFromDB())
 {
  //...
 }

 public function getFromCache()
 {
  // Methode getValueFromDB() called, once upon init static $value
  static $value ??= $this->getValueFromDB();

  return $value;
 }
}

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Re: [RFC Proposal] Null Coalesce Equal Operator

2016-03-30 Thread Björn Larsson

Thank you! I just thought it might have been possible to change
the text between the  tags on the RFC page. Good luck
with the voting!

Regards //Björn

Den 2016-03-30 kl. 22:25, skrev Midori Kocak:

Thank you, I removed ‘equal’, you were right.

I could not find a way to change url. Also voting is already started.

Midori


On 30 Mar 2016, at 22:22, Björn Larsson  wrote:

Hi,

Think the word equal should be removed from RFC name so
it becomes "Null Coalescing Assignment Operator" or?

Also on the page https://wiki.php.net/rfc, possible to change
the naming for "Null Coalesce Equal Operator" to reflect the
title in the RFC even if the underlying URL itself is the same?

Regards //Björn Larsson

Den 2016-03-24 kl. 23:49, skrev Mutlu Kocak:

thank you so much. I updated the name.

On Thursday, 24 March 2016, Andrea Faulds  wrote:


Hi Midori,

Midori Kocak wrote:


Hi,

I changed the name but I really don’ know how to change the url :)

Midori



I don't think you can change the URL. In the past I've seen people create
a new page in the /rfc/ namespace, copy the content there, and edit the old
page to point to the new one. But the URL doesn't really matter, you don't
need to change it. The original ?? RFC itself had a URL which was
completely different from the title. :)

I appreciate that you changed the name. Did you mean to remove the "Equal"
from the name, though? It's still there. (Sorry to bring this up again...)

Thanks!
--
Andrea Faulds
https://ajf.me/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php







--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Re: [RFC Proposal] Null Coalesce Equal Operator

2016-03-30 Thread Midori Kocak
Thank you, I removed ‘equal’, you were right.

I could not find a way to change url. Also voting is already started.

Midori

> On 30 Mar 2016, at 22:22, Björn Larsson  wrote:
> 
> Hi,
> 
> Think the word equal should be removed from RFC name so
> it becomes "Null Coalescing Assignment Operator" or?
> 
> Also on the page https://wiki.php.net/rfc, possible to change
> the naming for "Null Coalesce Equal Operator" to reflect the
> title in the RFC even if the underlying URL itself is the same?
> 
> Regards //Björn Larsson
> 
> Den 2016-03-24 kl. 23:49, skrev Mutlu Kocak:
>> thank you so much. I updated the name.
>> 
>> On Thursday, 24 March 2016, Andrea Faulds  wrote:
>> 
>>> Hi Midori,
>>> 
>>> Midori Kocak wrote:
>>> 
 Hi,
 
 I changed the name but I really don’ know how to change the url :)
 
 Midori
 
 
>>> I don't think you can change the URL. In the past I've seen people create
>>> a new page in the /rfc/ namespace, copy the content there, and edit the old
>>> page to point to the new one. But the URL doesn't really matter, you don't
>>> need to change it. The original ?? RFC itself had a URL which was
>>> completely different from the title. :)
>>> 
>>> I appreciate that you changed the name. Did you mean to remove the "Equal"
>>> from the name, though? It's still there. (Sorry to bring this up again...)
>>> 
>>> Thanks!
>>> --
>>> Andrea Faulds
>>> https://ajf.me/
>>> 
>>> --
>>> PHP Internals - PHP Runtime Development Mailing List
>>> To unsubscribe, visit:http://www.php.net/unsub.php
>>> 
>>> 
> 


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Re: [RFC Proposal] Null Coalesce Equal Operator

2016-03-24 Thread Andrea Faulds

Hi Midori,

Midori Kocak wrote:

Hi,

I changed the name but I really don’ know how to change the url :)

Midori



I don't think you can change the URL. In the past I've seen people 
create a new page in the /rfc/ namespace, copy the content there, and 
edit the old page to point to the new one. But the URL doesn't really 
matter, you don't need to change it. The original ?? RFC itself had a 
URL which was completely different from the title. :)


I appreciate that you changed the name. Did you mean to remove the 
"Equal" from the name, though? It's still there. (Sorry to bring this up 
again...)


Thanks!
--
Andrea Faulds
https://ajf.me/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Re: [RFC Proposal] Null Coalesce Equal Operator

2016-03-24 Thread Midori Kocak
Hi,

I changed the name but I really don’ know how to change the url :)

Midori

> On 24 Mar 2016, at 21:35, Andrea Faulds  wrote:
> 
> Hi,
> 
> Sara Golemon wrote:
>> Changing "equal" to "assignment" seems to have been the suggestion.
>> I've taken that into the short-ternary version.  And as a minor edit
>> (not worth closing/reopening vote) would recommend the same for null
>> coallesce.
>> 
>> -Sara
> 
> The other suggestion was to change "coalesce" to "coalescing", because the 
> former is a grammatical error I made when I wrote the original ?? RFC, 
> whereas the latter is the correct name.
> 
> Actually, if we go back to my original email on this subject:
> 
 Den 2016-03-13 kl. 02:59, skrev Andrea Faulds:
> I do have one thing to add, though. It's something of a nitpick, but the 
> name ought to be the "null-coalescing assignment operator". This would 
> follow the convention of referring to +=, -= etc. as compound/combined 
> assignment operators[1][2], not "equal" operators (which sounds more like 
> what == and === do, to me) and avoids the mistake ("coalesce" instead of 
> "coalescing") that I originally made in my RFC for ??.[3] I think that 
> RFC naming is important, because the name the author chooses for a 
> feature tends to be the one that ends up in the manual.
> 
> I already gave a suggestion for a name there: "null-coalescing assignment 
> operator".
> 
> It's not a big deal, though. :)
> 
> -- 
> Andrea Faulds
> https://ajf.me/
> 
> -- 
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Re: [RFC Proposal] Null Coalesce Equal Operator

2016-03-24 Thread Andrea Faulds

Hi,

Sara Golemon wrote:

Changing "equal" to "assignment" seems to have been the suggestion.
I've taken that into the short-ternary version.  And as a minor edit
(not worth closing/reopening vote) would recommend the same for null
coallesce.

-Sara


The other suggestion was to change "coalesce" to "coalescing", because 
the former is a grammatical error I made when I wrote the original ?? 
RFC, whereas the latter is the correct name.


Actually, if we go back to my original email on this subject:


Den 2016-03-13 kl. 02:59, skrev Andrea Faulds:

I do have one thing to add, though. It's something of a nitpick, but the name ought to be the "null-coalescing 
assignment operator". This would follow the convention of referring to +=, -= etc. as compound/combined assignment 
operators[1][2], not "equal" operators (which sounds more like what == and === do, to me) and avoids the 
mistake ("coalesce" instead of "coalescing") that I originally made in my RFC for ??.[3] I think 
that RFC naming is important, because the name the author chooses for a feature tends to be the one that ends up in the 
manual.


I already gave a suggestion for a name there: "null-coalescing 
assignment operator".


It's not a big deal, though. :)

--
Andrea Faulds
https://ajf.me/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Re: [RFC Proposal] Null Coalesce Equal Operator

2016-03-24 Thread Sara Golemon
Changing "equal" to "assignment" seems to have been the suggestion.
I've taken that into the short-ternary version.  And as a minor edit
(not worth closing/reopening vote) would recommend the same for null
coallesce.

-Sara

On Thu, Mar 24, 2016 at 8:46 AM, Midori Kocak  wrote:
> there were no suggestions. Do you have one?
>
>> On 24 Mar 2016, at 16:36, Björn Larsson  wrote:
>>
>> Den 2016-03-13 kl. 02:59, skrev Andrea Faulds:
>>> Hi Midori,
>>>
>>> Midori Kocak wrote:
 Forgive my rookieness and let me introduce my first RFC here: 
 https://wiki.php.net/rfc/null_coalesce_equal_operator 
 
>>>
>>> I think this is a reasonable proposal. I had foreseen that we might add a 
>>> ??= operator some day when I wrote the original RFC for the ?? operator.
>>>
>>> I do have one thing to add, though. It's something of a nitpick, but the 
>>> name ought to be the "null-coalescing assignment operator". This would 
>>> follow the convention of referring to +=, -= etc. as compound/combined 
>>> assignment operators[1][2], not "equal" operators (which sounds more like 
>>> what == and === do, to me) and avoids the mistake ("coalesce" instead of 
>>> "coalescing") that I originally made in my RFC for ??.[3] I think that RFC 
>>> naming is important, because the name the author chooses for a feature 
>>> tends to be the one that ends up in the manual.
>>>
>>> Anyway, thank you for your RFC!
>>>
>>> [1] http://php.net/manual/en/language.operators.assignment.php
>>> [2] 
>>> https://github.com/php/php-langspec/blob/master/spec/10-expressions.md#compound-assignment
>>> [3] https://blog.ajf.me/2015-12-07-poorly-named-rfcs
>>
>> Any conclusion on naming of operator, remain or change?
>>
>> Regards //Björn
>>
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Re: [RFC Proposal] Null Coalesce Equal Operator

2016-03-24 Thread Midori Kocak
there were no suggestions. Do you have one?

> On 24 Mar 2016, at 16:36, Björn Larsson  wrote:
> 
> Den 2016-03-13 kl. 02:59, skrev Andrea Faulds:
>> Hi Midori,
>> 
>> Midori Kocak wrote:
>>> Forgive my rookieness and let me introduce my first RFC here: 
>>> https://wiki.php.net/rfc/null_coalesce_equal_operator 
>>> 
>> 
>> I think this is a reasonable proposal. I had foreseen that we might add a 
>> ??= operator some day when I wrote the original RFC for the ?? operator.
>> 
>> I do have one thing to add, though. It's something of a nitpick, but the 
>> name ought to be the "null-coalescing assignment operator". This would 
>> follow the convention of referring to +=, -= etc. as compound/combined 
>> assignment operators[1][2], not "equal" operators (which sounds more like 
>> what == and === do, to me) and avoids the mistake ("coalesce" instead of 
>> "coalescing") that I originally made in my RFC for ??.[3] I think that RFC 
>> naming is important, because the name the author chooses for a feature tends 
>> to be the one that ends up in the manual.
>> 
>> Anyway, thank you for your RFC!
>> 
>> [1] http://php.net/manual/en/language.operators.assignment.php
>> [2] 
>> https://github.com/php/php-langspec/blob/master/spec/10-expressions.md#compound-assignment
>> [3] https://blog.ajf.me/2015-12-07-poorly-named-rfcs
> 
> Any conclusion on naming of operator, remain or change?
> 
> Regards //Björn
> 


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Re: [RFC Proposal] Null Coalesce Equal Operator

2016-03-24 Thread Björn Larsson

Couldn't agree more :)

//Björn

Den 2016-03-24 kl. 16:49, skrev Sara Golemon:

Changing "equal" to "assignment" seems to have been the suggestion.
I've taken that into the short-ternary version.  And as a minor edit
(not worth closing/reopening vote) would recommend the same for null
coallesce.

-Sara

On Thu, Mar 24, 2016 at 8:46 AM, Midori Kocak  wrote:

there were no suggestions. Do you have one?


On 24 Mar 2016, at 16:36, Björn Larsson  wrote:

Den 2016-03-13 kl. 02:59, skrev Andrea Faulds:

Hi Midori,

Midori Kocak wrote:

Forgive my rookieness and let me introduce my first RFC here: 
https://wiki.php.net/rfc/null_coalesce_equal_operator 


I think this is a reasonable proposal. I had foreseen that we might add a ??= 
operator some day when I wrote the original RFC for the ?? operator.

I do have one thing to add, though. It's something of a nitpick, but the name ought to be the "null-coalescing 
assignment operator". This would follow the convention of referring to +=, -= etc. as compound/combined assignment 
operators[1][2], not "equal" operators (which sounds more like what == and === do, to me) and avoids the 
mistake ("coalesce" instead of "coalescing") that I originally made in my RFC for ??.[3] I think 
that RFC naming is important, because the name the author chooses for a feature tends to be the one that ends up in the 
manual.

Anyway, thank you for your RFC!

[1] http://php.net/manual/en/language.operators.assignment.php
[2] 
https://github.com/php/php-langspec/blob/master/spec/10-expressions.md#compound-assignment
[3] https://blog.ajf.me/2015-12-07-poorly-named-rfcs

Any conclusion on naming of operator, remain or change?

Regards //Björn



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php