Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111100 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 52923 invoked from network); 22 Jul 2020 09:53:51 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Jul 2020 09:53:51 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 30BB21804C8 for ; Wed, 22 Jul 2020 01:48:13 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from srv015.mail.ichtushosting.com (srv015.mail.ichtushosting.com [159.69.182.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 22 Jul 2020 01:48:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stitcher.io ; s=default; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date: In-Reply-To:From:Subject:Mime-Version:Content-Type:Sender:Reply-To:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe :List-Post:List-Owner:List-Archive; bh=FEHmpVGWdw4AHNI7GywHoFWjmvbTCsGYKl6+rMNXVos=; b=azt9Itl17iUx2cD1MaodS2Zs+J GdjvZjkusabJbRuDhNl90QSutxTUuvm0wIDwGUQPL3eQ+HjmSdiP3z5DIdJjFvNV5w1lrxHWjy8Fb QQg1j34C6CJ3zLIl30cwWLIs4mNEayd+NHCicCMbAu8vG5I7zEISVkgyXGunKVH5DrkEy9UMx0099 Gi/P9pO6qNNYXbndy8S7AuMOUCtmitROC232NZzG+jna0pZG6r7+JEDoE13lfg4Xc5XI7nDBOchBU RxtGtb7UWzzQgbGGObCzkpRxKm1QMJk2iD7aXrGWxZyVf0nLlI/RLHst9gL0UHioMIGlnwatxEMRp M/4Rzwpw==; Received: from srv020.mail.ichtushosting.com ([78.46.213.219]) by srv015.mail.ichtushosting.com stage1 with esmtp (Exim MailCleaner) id 1jyAQ4-0007AI-MP from ; Wed, 22 Jul 2020 10:48:09 +0200 Received: from ptr-fq9pjph4ctfpkeqibp2.18120a2.ip6.access.telenet.be (ptr-fq9pjph4ctfpkeqibp2.18120a2.ip6.access.telenet.be [IPv6:2a02:1812:c3c:3a00:4571:1cf7:1860:ddb6]) (Authenticated sender: brendt@stitcher.io) by srv020.mail.ichtushosting.com (Postfix) with ESMTPSA id 1B0863EBFC; Wed, 22 Jul 2020 10:48:07 +0200 (CEST) X-MailCleaner-SPF: pass Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) In-Reply-To: Date: Wed, 22 Jul 2020 10:48:06 +0200 Cc: internals Content-Transfer-Encoding: quoted-printable Message-ID: <27E12C8A-3068-4EE2-BC84-B43C8D74A858@stitcher.io> References: To: Levi Morrison X-Mailer: Apple Mail (2.3608.80.23.2.2) X-MailCleaner-TrustedIPs: Ok Subject: Re: [PHP-DEV] Changing default assertion mode to throw exceptions From: brendt@stitcher.io (Brent Roose) Hi Levi I personally almost never use assert, and actually assumed it would = throw an error, so this sounds like a good change!=20 Have you done research on how this would affect the top-1000-ish popular = packages like Nikita does? Kind regards Brent > On 20 Jul 2020, at 15:48, Levi Morrison via internals = wrote: >=20 > On Mon, Jul 13, 2020 at 11:37 AM Levi Morrison wrote: >>=20 >> Hello everyone, >>=20 >> I'd like to change the default mode of assertion failures to throw. >> The current default is to warn. In my opinion this is a bad strategy: >> the engine asserted that something that is expected to be true is = not, >> so executing further is a bad idea. This leaves throwing or bailing >> out. I think throwing an exception is better than bailing out, so >> that's what I propose. >=20 > Hello, everyone. It's been a week and I have only heard a bit of > positive feedback and no pushback. Anyone else want to reply? >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php >=20