Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120096 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 65424 invoked from network); 21 Apr 2023 04:26:13 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 21 Apr 2023 04:26:13 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C397E1804D5 for ; Thu, 20 Apr 2023 21:26:12 -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=-0.6 required=5.0 tests=BAYES_00,BODY_8BITS, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 20 Apr 2023 21:26:12 -0700 (PDT) Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-2f6401ce8f8so769740f8f.3 for ; Thu, 20 Apr 2023 21:26:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datadoghq.com; s=google; t=1682051170; x=1684643170; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=o0/HmtZCKlkj7cOgKwySMN9JDNxnJvm6By19CN7DQ/A=; b=dtctEEIjN+iPERuMV9a47c05EC/neROHH1ZxoGpiBx8Ryx4FfsAxw2n5+5M1fnsda8 aSQOYbsBkerJFW4NSxeGWqLUfqMmbYWd1UFMRveFMz281lOJ6WTUkAdG8D+jyvWSKiRi RFj1HpoGr47duz/RbeIb7+0oI5bzO4+UGbuGA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682051170; x=1684643170; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o0/HmtZCKlkj7cOgKwySMN9JDNxnJvm6By19CN7DQ/A=; b=LdtSunFRNnUZx3Q40By37tuR0JNhuE3izUL6FdEe6j5cPkZllKjz5dBwILSspNXFeo Ft27ArMoTT6Rmk843mWw1TPgC3vDIvrc/oyG1arTD/3b1PnkRXin5Q/dpidxR8h/NeCc UwCo1w0IItWIMp3/N3TncPpn7W9gU1RB/TLZvFikMqg7SoWZeN4MHME6Wr7IKnmx7tpC eKeimOYhZHT5K0zTp2aXwAOL8zkOUlYyPAKpUdmfXi4HSX+GYFL9hYZuibvO829dn5Ij wT5aYn3mkfyUm13k6LXHNVg16VLZYBSr45wa7qR5+p28yBd04hslZO3O7l9UCyM8Faud kkoA== X-Gm-Message-State: AAQBX9drrdiyJDDXdoRjXcuwD4B62j1fZuDd6K0swWaAG+iIfgjOWWjZ LoFjwRdzpv9R4Q631dLBpOC43f1PKRuVckcU4C4ztVdEVKg6rsPd2RK8Qw== X-Google-Smtp-Source: AKy350ZCwoRw3J2MUnthBPpu4yUwfBq5xg3t6TeSa6BybpKlV983zf2Z5up/KtFftat5Gf1kOd2LshJOZUWYgXZu9lQ= X-Received: by 2002:a05:6000:1c9:b0:2ff:a878:2de9 with SMTP id t9-20020a05600001c900b002ffa8782de9mr2716973wrx.21.1682051170533; Thu, 20 Apr 2023 21:26:10 -0700 (PDT) MIME-Version: 1.0 References: <6b5de716-d769-4f0b-b3e6-5a5a211f035a@app.fastmail.com> In-Reply-To: Reply-To: Levi Morrison Date: Thu, 20 Apr 2023 22:25:59 -0600 Message-ID: To: Deleu Cc: Larry Garfield , php internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [Discussion] Callable types via Interfaces From: internals@lists.php.net ("Levi Morrison via internals") On Thu, Apr 20, 2023 at 9:57=E2=80=AFPM Deleu wrote: > > > > On Thu, Apr 20, 2023 at 8:23=E2=80=AFPM Levi Morrison via internals wrote: >> >> I'm going to stop here. Two big things: >> >> 1. I think reducing verbosity can be left for the future. We don't >> have to solve that right now. > > > >> What happens if I pass a short-closure? >> >> takeTwo(fn ($x, $y) =3D> $x + $y); >> >> I would be annoyed if I had to write the type info, but particularly >> the return type. > > > Sorry for the unhelpful email, but does anybody else see the irony here?= It's just too funny to not be mentioned =F0=9F=98=82=F0=9F=98=82=F0=9F=98= =82=F0=9F=98=82 > > -- > Marco Deleu Sure, I get that ^_^ But the difference is that there are quite a few ways we can solve the first verbosity (allowing `fn` instead of `callable`, allowing type aliases which could also be useful for unions, etc), and only things that seem hard to solve the second one (static type inference? delayed type checks?)