Re: [PHP-DEV] Re: RFC: Marking return values as important (#[\NoDiscard])

2025-02-12 Thread Morgan
On 2025-02-13 00:52, Volker Dusch wrote: b) Naming of the attribute Nobody mentioned this on the list, but before opening a vote we'd like to heard if the attribute name makes sense to you. On this, it could be spelled #[\MustUse], rather than phrase it as a negative.

Re: [PHP-DEV] RFC: Marking return values as important (#[\NoDiscard])

2025-02-12 Thread Jorg Sowa
I must agree with Kamil. I don't see practical benefits of this feature that would surpass the implications it has for the language. We already have static analysis handling such cases and it can be extended even to non-pure functions. Moreover, syntax (void) adds additional complexity to beginners

[PHP-DEV] [RFC][Vote] Static property asymmetric visibility

2025-02-12 Thread Larry Garfield
I hereby open the voting on static-aviz properties: https://wiki.php.net/rfc/static-aviz The vote will be open until 26 February. -- Larry Garfield la...@garfieldtech.com

Re: [PHP-DEV] Re: RFC: Marking return values as important (#[\NoDiscard])

2025-02-12 Thread Larry Garfield
On Wed, Feb 12, 2025, at 5:52 AM, Volker Dusch wrote: > On Wed, Jan 29, 2025 at 4:12 PM Tim Düsterhus wrote: >> Volker and I would like to start discussion on our RFC to allow "Marking >> return values as important (#[\NoDiscard])". >> >> Please find the following resources for your reference: >

Re: [PHP-DEV] RFC: Marking return values as important (#[\NoDiscard])

2025-02-12 Thread Rob Landers
On Wed, Feb 12, 2025, at 17:43, Tim Düsterhus wrote: > Hi > > Am 2025-02-12 15:07, schrieb Kamil Tekiela: > > I'd be honest, I have a very negative attitude towards this proposal > > and I'd be voting against it. It seems to me like it's creating a > > problem and then trying to find a solution

Re: [PHP-DEV] RFC: Marking return values as important (#[\NoDiscard])

2025-02-12 Thread Tim Düsterhus
Hi Am 2025-02-12 15:07, schrieb Kamil Tekiela: I'd be honest, I have a very negative attitude towards this proposal and I'd be voting against it. It seems to me like it's creating a problem and then trying to find a solution for it. Given that even Rust with a modern stdlib and ergonomic langu

Re: [PHP-DEV] RFC: Marking return values as important (#[\NoDiscard])

2025-02-12 Thread Kamil Tekiela
Hi Tim and Volker, I'd be honest, I have a very negative attitude towards this proposal and I'd be voting against it. It seems to me like it's creating a problem and then trying to find a solution for it. A return value is always supposed to be used. If some API is returning a value that can be s

Re: [PHP-DEV] RFC: Marking return values as important (#[\NoDiscard])

2025-02-12 Thread Bilge
On 29/01/2025 15:12, Tim Düsterhus wrote: Hi Volker and I would like to start discussion on our RFC to allow "Marking return values as important (#[\NoDiscard])". Please find the following resources for your reference: - RFC: https://wiki.php.net/rfc/marking_return_value_as_important - Imple

[PHP-DEV] Re: RFC: Marking return values as important (#[\NoDiscard])

2025-02-12 Thread Volker Dusch
On Wed, Jan 29, 2025 at 4:12 PM Tim Düsterhus wrote: > Volker and I would like to start discussion on our RFC to allow "Marking > return values as important (#[\NoDiscard])". > > Please find the following resources for your reference: > > - RFC: https://wiki.php.net/rfc/marking_return_value_as_im