Hi all,
> Hi internals,
>
> I created an RFC and put it in discussion status.
> https://wiki.php.net/rfc/add_bcdivmod_to_bcmath
>
> I expect return values will probably be the main topic of discussion.
>
> Regards,
>
> Saki
The disscussion appears to have calmed down.
I'm going to open up
On Wed, 10 Jul 2024, Derick Rethans wrote:
> On Mon, 1 Jul 2024, Saki Takamachi wrote:
>
> The example has:
>
> [$perMouth, $slicesLeft] = $slicesOfPizza->divmod($mouthsToFeed);
>
> // $perMouth->value is '2'
> // $slicesLeft->value is '2'
>
> Shouldn't that be (withou
On Mon, 1 Jul 2024, Saki Takamachi wrote:
> Hi,
>
> >> Just a suggestion: what about making the returned array an associative
> >> array ? Like so:
> >> ```
> >> array(
> >> 'quotient' => 61,
> >> 'remainder' => 1,
> >> );
> >> ```
> >> This would remove the need for devs to remember th
Hi
On 6/30/24 18:08, Rob Landers wrote:
We can argue the semantics of input/output, but the point still stands that
return by reference is still more common than structured array, and even then,
those are usually much bigger things.
Happy to argue with you. I explained for each of the examp
Hi Larry,
> I agree an associative array is the second-worst option. An inout by-ref
> argument is the absolute worst.
>
> Normally my default position is that when in doubt, make it a structured
> object with properly defined properties, and screw whatever micro-performance
> hit it is, you
On Sun, Jun 30, 2024, at 17:45, Tim Düsterhus wrote:
> Hi
>
> On 6/30/24 17:31, Rob Landers wrote:
> > - list() -- kinda
>
> That is not a function.
>
> > - array_shift(), array_pop(), etc.
>
> These do not return by out-parameter. These return the value and modify
> the array by reference to
Hi
On 6/30/24 17:31, Rob Landers wrote:
- list() -- kinda
That is not a function.
- array_shift(), array_pop(), etc.
These do not return by out-parameter. These return the value and modify
the array by reference to remove the returned value.
- preg_match*()
These only return suppleme
On Sun, Jun 30, 2024, at 10:11 AM, Saki Takamachi wrote:
> Hi,
>
>>> Just a suggestion: what about making the returned array an associative
>>> array ? Like so:
>>> ```
>>> array(
>>> 'quotient' => 61,
>>> 'remainder' => 1,
>>> );
>>> ```
>>> This would remove the need for devs to remembe
On Sun, Jun 30, 2024, at 17:11, Saki Takamachi wrote:
> Hi,
>
> >> Just a suggestion: what about making the returned array an associative
> >> array ? Like so:
> >> ```
> >> array(
> >> 'quotient' => 61,
> >> 'remainder' => 1,
> >> );
> >> ```
> >> This would remove the need for devs t
Hi,
>> Just a suggestion: what about making the returned array an associative
>> array ? Like so:
>> ```
>> array(
>> 'quotient' => 61,
>> 'remainder' => 1,
>> );
>> ```
>> This would remove the need for devs to remember the order of the return
>> values and would make the return value s
On Sun, Jun 30, 2024, at 16:16, Juliette Reinders Folmer wrote:
> On 30-6-2024 16:04, Saki Takamachi wrote:
>> Hi internals,
>>
>> I created an RFC and put it in discussion status.
>> https://wiki.php.net/rfc/add_bcdivmod_to_bcmath
>>
>> I expect return values will probably be the main topic of d
Hi
On 6/30/24 16:16, Juliette Reinders Folmer wrote:
Just a suggestion: what about making the returned array an associative
array ? Like so:
```
array(
'quotient' => 61,
'remainder' => 1,
);
```
This would remove the need for devs to remember the order of the return
values and would
On 30-6-2024 16:04, Saki Takamachi wrote:
Hi internals,
I created an RFC and put it in discussion status.
https://wiki.php.net/rfc/add_bcdivmod_to_bcmath
I expect return values will probably be the main topic of discussion.
Regards,
Saki
Just a suggestion: what about making the returned a
Hi internals,
I created an RFC and put it in discussion status.
https://wiki.php.net/rfc/add_bcdivmod_to_bcmath
I expect return values will probably be the main topic of discussion.
Regards,
Saki
14 matches
Mail list logo