Newsgroups: php.internals,php.internals Path: news.php.net Xref: news.php.net php.internals:122949 php.internals:122950 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 851A11A009C for ; Thu, 4 Apr 2024 21:38:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1712266731; bh=OzA8b+fLnS1mWp6p1eGVf3QmVdMGFeD9ghcXm+2d02k=; h=From:Subject:Date:References:To:In-Reply-To:From; b=kYC4jv/thN5MHvXXB6IEKZTfsD5hg9XgN3o95qyPlIIc+daepDnPx92K41WnjcKWT hO+Yhr/v3YBVoOS1u38cfT1dlJxTMPCb7sE7KBCvnEJ/kLIRqyKNPxMB5nB++HLmA+ FKP2ekNeUJWaXHuGVVpt2Y0UQK/a1rzUOxVbU1FfdfzjD/T0ZEIxGl/oY/GSelbu+j 1dtDXAO4PvIUI/gJvpMKCg5Q5HJKrWaU0gaip/ad/2c/Y2b6FCLJqsAti0QhPhUav/ SZFgg+zhvdBQQRHVtis4W/kaQm4jv9NWZCxaIWCK9tK7hYWT9xpWh5RmJtDTIn8iWf RwBV2wAUAceUA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8E61D1809E2 for ; Thu, 4 Apr 2024 21:38:50 +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_MISSING, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 4 Apr 2024 21:38:50 +0000 (UTC) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-6e6b6f86975so1103462b3a.1 for ; Thu, 04 Apr 2024 14:38:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=itafroma.com; s=google; t=1712266699; x=1712871499; darn=lists.php.net; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=OzA8b+fLnS1mWp6p1eGVf3QmVdMGFeD9ghcXm+2d02k=; b=KRa83agFD6xnFf91SIAGg1E/6myAibzwlr6MQLVJjlUdcwGHMxYAhzVTAzobdxWhkn fw4BGqvyPbGFRWneMXLH3RL8FZp8cubHHBKUAs9EQZiGNHLgqV/pkGsVN7YbFcZDzCDL 1Zsbbxm4ppXquMF6VFlqmVHZDu7c67tzhZ+ic= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712266699; x=1712871499; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OzA8b+fLnS1mWp6p1eGVf3QmVdMGFeD9ghcXm+2d02k=; b=baHsZcxsIgtxqEcpBx6E+Fbe8anvvBQ4vruXYxfmSZkpERXyY1UmXGwpq3zMp1huTf 05k+eE4VlDeDlVDynkYYEujj+jFNv1Dhn8rB8M6oLcXdrMhpyAm3MJ7I+4PLhjRnNW1R +R2XC8P1xZX99spmnyGKVdAFjt6I+YWDh8wXfbVcpvTzd8eu5KAatwtK8q6ur1mMj9Em a7zlZb2cuJ1/T12zPGXX6Wij/HHMCryGCdDS+vvbPwV1s3s9ihxllAoiAS5WtDFbLkh2 dNgXUKmMXNi+LItBeNyiwR4k4qStRJscl4sH/FsFqH30/43I8B3PXEgEhb8ADcfnUesv DEAQ== X-Gm-Message-State: AOJu0YxGwkbf2gEBLnvA1LXSn0STos/A/1RBQZTRNhA+1Hb9R+ZPIy/n zlrSExKsethgr0YSY7XyqgJvLOlW97hSigF9FQd+brsEWAYENnwUkt0FUkFEgMMSWm4MsgR6fHc = X-Google-Smtp-Source: AGHT+IF1Knpy+Zl8B8J/KMcQfiItoj9NZ/uJb11ZiwWLUvYYkmswGBHsX6yvdQNaPjrHaJOepST4xw== X-Received: by 2002:a05:6a20:9494:b0:1a7:1e0b:cfbf with SMTP id hs20-20020a056a20949400b001a71e0bcfbfmr3549488pzb.23.1712266699498; Thu, 04 Apr 2024 14:38:19 -0700 (PDT) Received: from smtpclient.apple ([174.127.214.84]) by smtp.gmail.com with ESMTPSA id w5-20020aa79a05000000b006e4e93f4f17sm108919pfj.117.2024.04.04.14.38.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Apr 2024 14:38:19 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Subject: Re: [PHP-DEV] RFC idea: using the void type to control maximum arity of user-defined functions Date: Thu, 4 Apr 2024 14:38:08 -0700 References: <6299b649-c19b-4172-9632-2ef0a55d256d@uzy.me> <7B32AF65-CA40-40F5-BA59-CB5180EC4D7F@gmail.com> <8f71d807-78e6-49f6-acc7-b1fc09d815ba@uzy.me> <989e3e13-48ee-4970-8485-f79bb70ad37c@bastelstu.be> To: internals@lists.php.net In-Reply-To: Message-ID: <3B22ABD9-7F0F-4772-B47A-FD0A7068F63D@itafroma.com> X-Mailer: Apple Mail (2.3774.500.171.1.1) From: mark@itafroma.com (Mark Trapp) On Thu, Apr 4, 2024 at 2:16=E2=80=AFPM Bilge = wrote: >=20 > On 04/04/2024 16:57, Tim D=C3=BCsterhus wrote: >> I think it would be reasonable to consider deprecating passing extra >> arguments to a non-variadic function. >=20 > This seems like the only reasonable thing to do, to me. If this were = the > case, there should be no need for any new syntax, since we could = simply > deny passing extra arguments in the next major, no? >=20 > Bilge I'd caution about being too hasty to deprecate and remove support for this feature without understanding the underlying reasons why it has been used historically, and without providing a better (not just different) alternative for those use cases, lest an impossible upgrade path is created. While the variadic operator should be a 1:1 replacement for using func_get_args(), is it enough of a benefit to force potentially tens of thousands of codebases to change when they both accomplish the same thing? What bad thing happens if PHP continues to support both methods? There is already enough friction to upgrade between major versions. Introducing an optional attribute or syntax allows codebases that care about signature strictness get that safety, while avoiding a potentially costly and onerous upgrade for the community. - Mark