2021-04-26 9:37 GMT+02:00, Pierre <pierre-...@processus.org>:
> Le 26/04/2021 à 09:35, Olle Härstedt a écrit :
>> 2021-04-26 9:22 GMT+02:00, Pierre <pierre-...@processus.org>:
>>> Le 25/04/2021 à 21:22, Larry Garfield a écrit :
>>>> Stitching together 2 replies to minimize thread noise...
>>>>
>>>> On Sun, Apr 25, 2021, at 11:58 AM, Michał Marcin Brzuchalski wrote:
>>>>
>>>>> Speaking of Attributes I prefer not to use an Attribute for any
>>>>> particular
>>>>> language feature which expects input arguments to be a valid class or
>>>>> interface name for two reasons: first because there is no effective
>>>>> way
>>>>> to
>>>>> restrict input string to be a valid class or interface name and second
>>>>> that
>>>>> it'd require passing strings which means in most cases passing class
>>>>> or
>>>>> interface name with magic ::class constant read.
>>>>>
>>>>> Cheers,
>>>>> Michał Marcin Brzuchalski
>>>> That's actually a pretty solid argument against attributes here,
>>>> honestly.
>>>>   Consider me convinced, and now in favor of "final class Foo permits
>>>> Bar,
>>>> Baz". :-)
>>>>
>>> Yes, even though I was the first mail suggesting it in the beginning,
>>> this is a solid argument which actually do change my mind.
>>>
>>> In the end, I like the `class Foo permis Bar, Baz` syntax, with a single
>>> keyword added.
>>>
>>> --
>>>
>>> Pierre
>>>
>>> --
>>> PHP Internals - PHP Runtime Development Mailing List
>>> To unsubscribe, visit: https://www.php.net/unsub.php
>>>
>>>
>> Is there actually a bug that this functionality can/could prevent? I
>> get that Maybe and Result types should be closed, but what are the
>> risk of software defects if someone abuses that fact (locally)?
>
> I don't know if you replied to the right mail, I should have specified I
> was talking about using an attribute versus adding a new keyword to the
> language.

Sorry, I was replying to the thread in general, not your reply
specifically. ^^ Maybe I should have replied to the top mail instead,
sorry.

Olle

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

Reply via email to