Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123100 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 357CB1A009C for ; Wed, 10 Apr 2024 17:21:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1712769747; bh=QdBqcTKqKwI3/v49jBF88GbSDQNd//wqnGatOQop6JQ=; h=Date:Subject:To:References:From:In-Reply-To:From; b=k0idoI+PMPcZA73sLHqt0y0n8N+alVEDnhW56MYAAEoZE+O0QbrG5Mb+BLfhL1Epb jdbDkZO9lMWl17CAzTBJd+I32l5dCZZSLcRMSO/NSphX+oc+zZNp0sIfmETauZLtsQ feKmOOB3EJMRKVMYIiicwNQQISM5JLMSpfrqbIxVOPRAxS8oTNJFLkNzXkLJ+HHxbW iIZht8YrA9H7k0uWfr6/eDUY4fth2690TzCHn1AqwMCK54fd6Ud1yOExMdaznAVQeG H6qPun43jtr45BgsL2CyP8sWYM8EjXjA6nIc5dFSCpOUUuCP8ETN/bsjBaWXmjieaY b3r84XIISbXDw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id BED9A18088D for ; Wed, 10 Apr 2024 17:22:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (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, 10 Apr 2024 17:22:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1712769708; bh=c2zDp2AFVNaa7bhh0HXb0R2Jwtre0hlB2y21Cxftauc=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=U95gQxY87OhqXynOKY6HEMpjK6mZIC2bWiJN1g++WphM5O0Jsr7ze4u9lEegKgeyE DY6WphjCk5yGhfhFM5gB07h1KU7vYK/TdzYQ+WqRb+sg5eaQoZi6/NHNCpmuve0m4n YLJ0HLfvIuUN77lTrrGtR3Rq+jRtEolaUBp9YbJVXTI9Mo/LJfubdIvr/P/eN65Dmh 5YqPCIDsdWlOteuMPgUicAUzlKKW0HK9Y0kioPlIyJYzwUYbVfQcfdZIs6Y13+eAGn Cr6nxsW854IDHoPv9Yatcko1kATV2F9nyfdlsWkpV/Gt4+Vkbccy+RrmU12yxUtiX3 wMDcuJDyHT6Kw== Message-ID: <9d928e90-933c-483f-8bb7-24f960dd926f@bastelstu.be> Date: Wed, 10 Apr 2024 19:21:46 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Subject: Re: [PHP-DEV] RFC [Discussion]: array_find To: Larry Garfield , php internals References: <24e4529d-0b75-44de-90ef-34de5dfb1c99@wcflabs.de> <278889be-82ab-4827-a9e7-801b5ba2d8f8@app.fastmail.com> <45b726f4-8085-43e2-b701-6b35bc249409@wcflabs.de> <2dd7ef64-d1c5-4ed8-964f-b86dba110e0d@app.fastmail.com> Content-Language: en-US In-Reply-To: <2dd7ef64-d1c5-4ed8-964f-b86dba110e0d@app.fastmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 4/10/24 00:12, Larry Garfield wrote: >> I feel the same. Adding an enum for each binary parameter that is >> semantically true and false feels quite unwieldy with how class / enums >> / interfaces are currently organized in the namespace hierarchy. > > Point of order: This parameter is *not* semantically true and false. It is semantically either/or, and we kinda twist sideways to make it look like true/false if we squint. That's actually pretty common in the current stdlib, though it's not a good approach. Hence why I asked about an enum. I wouldn't expect it to be single-function, though, but to be applicable for multiple functions. (I did not go looking to see if such functions exist.) Whoops, I accidentally a word in that paragraph, thank you. It should have read "each binary parameter that is NOT semantically true and false". Best regards Tim Düsterhus