On Thu, Apr 20, 2023 at 9:57 PM Deleu wrote:
>
>
>
> On Thu, Apr 20, 2023 at 8:23 PM Levi Morrison via internals
> wrote:
>>
>> I'm going to stop here. Two big things:
>>
>> 1. I think reducing verbosity can be left for the future. We don't
>> have to solve that right now.
>
>
>
>> What happens
On Thu, Apr 20, 2023 at 8:23 PM Levi Morrison via internals <
internals@lists.php.net> wrote:
> I'm going to stop here. Two big things:
>
> 1. I think reducing verbosity can be left for the future. We don't
> have to solve that right now.
>
What happens if I pass a short-closure?
>
> takeTw
Hi Internals, sorry for the potential long email, but I can't sleep and I
want to dump this out of my brain.
Just a quick intro, let's recap PHP simple nature with this index.php file:
```
https://wiki.php.net/rfc/core-autoloading) and Callable Interfaces (
https://externals.io/message/120083) an
On Thu, Apr 20, 2023 at 11:25 AM Larry Garfield wrote:
>
> Hi folks. This is a pre-discussion, in a sense, before a formal RFC.
> Nicolas Grekas and I have been kicking around some ideas for how to address
> the desire for typed callables, and have several overlapping concepts to
> consider.
On Thu, Apr 20, 2023, at 9:47 PM, David Gebler wrote:
> On Thu, Apr 20, 2023 at 6:25 PM Larry Garfield
> wrote:
>
>> ## The options
>>
>> There's three ways we've come up with that this design could be
>> implemented. In concept they're not mutually exclusive, so we could do
>> one, two, or three
On Thu, Apr 20, 2023 at 6:25 PM Larry Garfield
wrote:
> ## The options
>
> There's three ways we've come up with that this design could be
> implemented. In concept they're not mutually exclusive, so we could do
> one, two, or three of these. Figuring out which approach would get the
> most sup
On Thu, Apr 20, 2023, at 8:26 PM, Michał Marcin Brzuchalski wrote:
> Hi
>
>> There is one loophole, in that an interface may require an __invoke()
>> method:
>>
>> interface TwoInts
>> {
>> public function __invoke(int $a, int $b): int;
>> }
>>
>>
> I was playing around with the code and parser
Hi
> There is one loophole, in that an interface may require an __invoke()
> method:
>
> interface TwoInts
> {
> public function __invoke(int $a, int $b): int;
> }
>
>
I was playing around with the code and parser for this in 2020 but my idea
was to introduce a new syntax that is inspired by C
On Thu, Apr 20, 2023, at 7:30 PM, Dan Ackroyd wrote:
> On Thu, 20 Apr 2023 at 18:25, Larry Garfield wrote:
>>
>> Hi folks. This is a pre-discussion, in a sense, before a formal RFC.
>
>
> Hi Larry,
>
> The "Allow casting closures into single-method interface
> implementations" one seems a complet
Hi Tim,
czw., 20 kwi 2023 o 16:39 Tim Düsterhus napisał(a):
> ...
> But please no entirely new syntax with braces as it currently is shown
> in the examples in the RFC.
>
Then we should vote for syntax. Personally, I prefer braces here
because it doesn't look like a regular function call allowi
On Thu, Apr 20, 2023, at 7:10 PM, Deleu wrote:
> On Thu, Apr 20, 2023 at 2:25 PM Larry Garfield
> wrote:
>
>> But that runs quickly into the problem of verbosity, reusability, and type
>> aliases, and the discussion usually dies there.
>>
>
> Just out of curiosity, was there ever a discussion thre
On Thu, 20 Apr 2023 at 18:25, Larry Garfield wrote:
>
> Hi folks. This is a pre-discussion, in a sense, before a formal RFC.
Hi Larry,
The "Allow casting closures into single-method interface
implementations" one seems a complete non-starter, as that seems
really hard to work with. You'd have
On Thu, Apr 20, 2023 at 2:25 PM Larry Garfield
wrote:
> But that runs quickly into the problem of verbosity, reusability, and type
> aliases, and the discussion usually dies there.
>
Just out of curiosity, was there ever a discussion thread dedicated for
Type aliases? I couldn't find it on exte
Hi folks. This is a pre-discussion, in a sense, before a formal RFC. Nicolas
Grekas and I have been kicking around some ideas for how to address the desire
for typed callables, and have several overlapping concepts to consider. Before
going down the rabbit hole on any of them we want to gauge
On 20.04.2023 16:15, Larry Garfield wrote:
or $point = clone($point, x: $x, y: $y, z: $z);
Also, I didn't see it mentioned, but maybe for future scope, these new
arguments should be passed to __clone().
They should not. See
https://peakd.com/hive-168588/@crell/object-properties-part-2-exampl
Hi
On 4/20/23 16:17, Larry Garfield wrote:
On Thu, Apr 20, 2023, at 7:00 AM, Rowan Tommins wrote:
Rather than making everything use an array or array-like syntax, I
would probably go the other way and scrap the special syntax for
dynamic names, making the whole thing look like a function call,
On Thu, Apr 20, 2023, at 7:00 AM, Rowan Tommins wrote:
> Rather than making everything use an array or array-like syntax, I
> would probably go the other way and scrap the special syntax for
> dynamic names, making the whole thing look like a function call, with
> support for array unpacking:
>
On Thu, Apr 20, 2023, at 7:22 AM, Aleksander Machniak wrote:
> On 20.04.2023 09:00, Rowan Tommins wrote:
>> Rather than making everything use an array or array-like syntax, I would
>> probably go the other way and scrap the special syntax for dynamic names,
>> making the whole thing look like a f
On 20/04/2023 08:11, Robert Landers wrote:
public function withStatus($code, $reasonPhrase = ''): Response
{
return clone $this {
$this->statusCode = $code;
$this->reasonPhrase = "Old: $this->reasonPhrase, New: $reasonPhrase";
}
};
Note that this is not the current
On 20.04.2023 09:00, Rowan Tommins wrote:
Rather than making everything use an array or array-like syntax, I would
probably go the other way and scrap the special syntax for dynamic names,
making the whole thing look like a function call, with support for array
unpacking:
$point = clone $poin
On Thu, Apr 20, 2023 at 9:01 AM Rowan Tommins wrote:
>
> On 18 April 2023 17:48:00 BST, "Tim Düsterhus" wrote:
> >I'd rather see only the fat-arrow being allowed. Unless I'm missing
> >something, braces with colon is not used anywhere else, whereas braces +
> >'=>' is known from match() and '=>
On 18 April 2023 17:48:00 BST, "Tim Düsterhus" wrote:
>I'd rather see only the fat-arrow being allowed. Unless I'm missing something,
>braces with colon is not used anywhere else, whereas braces + '=>' is known
>from match() and '=>' more generally is already used with array literals [1].
>Havi
22 matches
Mail list logo