Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115736 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 69885 invoked from network); 15 Aug 2021 10:12:07 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 Aug 2021 10:12:07 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DBB241804CF for ; Sun, 15 Aug 2021 03:43:49 -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,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) (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 ; Sun, 15 Aug 2021 03:43:49 -0700 (PDT) Received: by mail-io1-f46.google.com with SMTP id t13so5690547ioj.7 for ; Sun, 15 Aug 2021 03:43:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=g5rgCb9x6J/k8HhTaZVh1GgR8/kO885mXq3s+VnipLY=; b=AxaC2q7CUSJRFKfxFZMJTjaeL6U7Lf0z8pVbwzqI6UswAhUybYS70gyuab4GaVabcn hRJd5GRbF7Pf/b2LG8ca1w5iTJ+DXDhlLIJMzun2kMYInWzadgLflH+Cvr4q0tjGAiuB 83rqP5zmmRoJBis1uo9QJP9jEKXuRoiiqoXd0D5ar+xasnaNQ2ngmjL+9Guu3XwKMb1B s2IFFrSljxGiLcN86iMUX5mHYr0rHVt9PQwt4HbuQScp0UcZRDRwKgtaXD4csxgc6ef2 n0jP3GEPyYkTjoaTWpeDSWMjrWtWOubzDSAcaL/30rte4JD0tw3unO9SEPmZc18fZiSu mXnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=g5rgCb9x6J/k8HhTaZVh1GgR8/kO885mXq3s+VnipLY=; b=cRzwTKH+Y2oX9yVUACXHkji99cvbNbu6j1p4IHQhugDucg9BAG6J/Jepa0leTR3tcM 7gq32A+fUAyI7NrGQg5KzdMSMQXT1aVfYalkUwfhLc1m5gkF2Dfniztmn/UZZgm+Ejwd G2mzB2ZAoQpPbuRPGSXs0AbfvwRn2E0Wluem36wS5kqOiPX0cdBOclEd08haS1GvWOnY CS1LbX5rDypwOrkpEuw7b0vZPvqTu9eU8c8DUApLQASCAkIywFjZcN7UFamK0W4U4gfo HDRvRL9qwY86ocYSWCSZo8n6pJprIM0Q5Mu14+ohmK4ewB1sU5AFRGd7jgp6zCPPJaIT u9ew== X-Gm-Message-State: AOAM531BicNwbqQ54JJFYOrdwsy8vwKnrOhGvp9WmhL+46EG9SArqCbM S7T6hrsS1P0U9uSbRg08P6O7rR+dPkurxXLFZQ0= X-Google-Smtp-Source: ABdhPJzUFprN4K+3V+fX07B3HErChLezBMSMuzZTrtICigY2prFXDQMkNIB4W7ZEIv45XvoDcyym5DceYrAkn44r1Pc= X-Received: by 2002:a02:2348:: with SMTP id u69mr10431768jau.141.1629024226264; Sun, 15 Aug 2021 03:43:46 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 15 Aug 2021 12:43:21 +0200 Message-ID: To: Jordan LeDoux Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000564b0805c996c2d0" Subject: Re: [PHP-DEV] [RFC] Never For Argument Types From: kjarli@gmail.com (Lynn) --000000000000564b0805c996c2d0 Content-Type: text/plain; charset="UTF-8" On Sat, Aug 14, 2021 at 1:27 AM Jordan LeDoux wrote: > > Any feedback is greatly appreciated. > https://github.com/JordanRL/never-argument-type My only feedback is that it should not be called `never`. If I see `never` as the parameter type, I read this as never being allowed to pass anything, which means that `foo('something')` with `foo(never $something)` will result in a compile error. The type `never` only makes sense from a return type perspective: "Should it return? never". Perhaps `any` or `anything` makes more sense? I've also seen a suggestion to name it `abstract`, and maybe there are more suggestions I've missed. To me it also sounds like the goal of `never` as a parameter type is different from the return type. From my understanding one indicates that a type is required, while the other indicates that nothing ever returns, giving it the same name is confusing. Apologies for sending this message twice to you Jordan, reply to all is not my default reply button. --000000000000564b0805c996c2d0--