Re: [RFC] Context Managers

From: Date: Thu, 30 Apr 2026 07:52:26 +0000
Subject: Re: [RFC] Context Managers
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-130715@lists.php.net to get a copy of this message
Hi Am 2026-04-30 09:42, schrieb Rob Landers:
I'd argue CMs are mechanisms, not policies. They encode setup and teardown. Suppression is an error-handling policy decision that should be visible at the call site, not mixed with the concerns of setting up and tearing down resources.
I agree here and noted something similar in the “RAII vs Context Manager” thread: https://news-web.php.net/php.internals/129463 (last paragraph). Best regards Tim Düsterhus

« previous php.internals (#130715) next »