Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117165 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 7987 invoked from network); 28 Feb 2022 16:14:28 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Feb 2022 16:14:28 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7193C18053A for ; Mon, 28 Feb 2022 09:35:29 -0800 (PST) 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.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS29838 64.147.123.0/24 X-Spam-Virus: No X-Envelope-From: Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 28 Feb 2022 09:35:28 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 9546D320100E for ; Mon, 28 Feb 2022 12:35:27 -0500 (EST) Received: from imap43 ([10.202.2.93]) by compute5.internal (MEProxy); Mon, 28 Feb 2022 12:35:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=eYmdmwXpWV8XBR3Lz 1Aycq+zjAJxqro1fy49S6qRUVY=; b=Kwv+U7rqeHdJQ0SUE/vnuSb9k7ODyoq/+ B8rnwA5LwsfoMsgQEe2ELyOoDpUK1hYg3PO8jR6tP7RbtZlIwRbFeImdyfNDPn9i pqJyWAg14/SH5Ca2okVFgjD/mjcdLWXMcDiIAoRMQleMDnhTmxTL+vJwXHi6Zfot KKWQEQ/nJ9ryACeuiCiDR6gVCfvbrtTjVCES9NB1acMzzUAo/v/3O1DXW7dJqtR3 fI7R5Q+aB7XFO7nLPk9xPuIusBmnvqJP/y3kASDatZgg5H+v1SjUxwYJou0fqhgb UHMZAN69yKI1p4TQ0S1TifCRp5x6eQaczS6OzTSYZ6B8TYZJ0L84A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddruddttddguddtudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuggftrfgrthhtvghrnhepgeelgfekudeivddvteffueejffdthfejieevhefg ffekudevkedtvdelvddvffefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id E6D2CAC0E99; Mon, 28 Feb 2022 12:35:26 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-4778-g14fba9972e-fm-20220217.001-g14fba997 Mime-Version: 1.0 Message-ID: <4c1f2c99-9062-4151-a783-c297be5a62a8@www.fastmail.com> In-Reply-To: References: <983552d8-11f1-b5bc-fb82-148347982fda@gmx.de> Date: Mon, 28 Feb 2022 11:35:06 -0600 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] Allowing NULL for some internal functions From: larry@garfieldtech.com ("Larry Garfield") On Mon, Feb 28, 2022, at 5:28 AM, Mark Randall wrote: > On 28/02/2022 01:46, Craig Francis wrote: >> Personally I think `strict_types=1` is fine for my code, but I would never >> want to force that style on everyone, because doing so would be fairly >> hostile for a language that's popular and well known for being easy to >> use/learn. > > Magically coercing things and hiding things under the hood is useful for > the first 10 minutes of learning. > > After that it just becomes a hindrance difficult because you have to > know all of the secret rules about type juggling. This needs to be called out more. "Easy to learn" doesn't come from being forgiving of sloppiness. It comes from making the non-sloppy approach straightforward, obvious, and if someone does do something sloppy the error message(s) point people toward doing it the right way. Forgiving of sloppiness is how you gt security errors, not ease of use. --Larry Garfield