Re: [PHP-DEV] Expanding the scope of the #[NoDiscard] attribute

2025-07-01 Thread Tim Düsterhus
Hi Am 2025-07-01 16:41, schrieb Kenta Usami: I'm writing to start a discussion about expanding the use of the newly accepted #[NoDiscard] attribute. I believe this attribute is a fantastic addition that will help prevent many subtle bugs, and we can make it even more effective by applying it to

Re: [PHP-DEV] Expanding the scope of the #[NoDiscard] attribute

2025-07-01 Thread Kenta Usami
Hi Tim, Thank you for your reply and for the clarification. As one of the RFC authors, your insight is very helpful. I now have a much clearer understanding of the RFC's intent. Your point that #[NoDiscard] is not meant for every pure function, but rather for those where ignoring the return value