Re: [PHP-DEV] Two new functions array_first() and array_last()

2023-10-17 Thread Michael Cordover
On Tue, Oct 17, 2023, at 12:19, Saki Takamachi wrote: >> What about a signature like: >> >> ```php >> array_first(array $array, mixed $value_if_missing = null); >> ``` >> >> That would let you specify your own sentinel (or default) where appropriate, >> without losing the convenience of this fun

Re: [PHP-DEV] Two new functions array_first() and array_last()

2023-10-17 Thread Michael Cordover
On Tue, Oct 17, 2023, at 05:10, Levi Morrison via internals wrote: > It's true that sentiment may have shifted in this time. However, a > common argument at that time still stands: `null` is not a good > sentintenal for failure because the value inside the array very well > could have been null.

Re: [PHP-DEV] About the use of the terms master/slave and blacklist, proposal to replace.

2020-06-15 Thread Michael Cordover
On Mon, Jun 15, 2020, at 12:36, Reinis Rozitis wrote: > > The word "master" has 18 meanings in English, according to > > https://en.m.wiktionary.org/wiki/master - do you propose to outlaw those > > 17 of them that have nothing to do with slavery, too? What about master's > > degree, for example? >

Re: [PHP-DEV] Operator overloading for userspace objects

2020-01-28 Thread Michael Cordover
On Tue, Jan 28, 2020, at 18:47, Ben Ramsey wrote: > If you take mutation off the table, then things become easier, IMO. We > only need two magic methods: > > * __toInteger(): int > * __toFloat(): float > > Then, in any mathematical context, PHP could call the appropriate > method and use the nu

Re: [PHP-DEV] Re: Syntax in PHP 6

2005-12-02 Thread Michael Cordover
Sara Golemon wrote: I say this with no degree of sarcasm or ill-will: Create a formal proposal. Well, you asked for it ;). Goals: - remove confusion when a user thinks about a function's name - develop consistency throughout the language - be backwards compatible as much as possible The ba

Re: [PHP-DEV] Re: Syntax in PHP 6

2005-11-24 Thread Michael Cordover
[EMAIL PROTECTED] wrote: Perhaps this has already been proposed and I missed it as I'm new to the list, but why not set a release in the future, say PHP8, in which there will be no holds barred about breaking bc? Everyone would know that this upcomming release would be the one that resolves all i