Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129332 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 lists.php.net (Postfix) with ESMTPS id 1388F1A00BC for ; Thu, 20 Nov 2025 14:22:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1763648534; bh=3EWspKF5vZvTte95YRUFdsayOPaSlG4iy4dp7J5cijY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=nN79WC+m52n9xWMyJMTeEA+3koU7uoJIfPyWKuWIdtzvjDmJPgNZcHTZUoFyAjcs9 nln5kFlLS4Zf1HZSX5SzLilbmXpjxcBg38tAQu+qsdkiAizBanJE0ilT+edqsMV19F OJUEqUvP3J5Kpk9e7dZtXs2sKqP4HDdCpnvLb6/VbrtJ8aKCidlUA/ltiIDlnoSs6w 8sGe+e66edwpW1wYDtO0u8uxNke7nGNLB7U9tu6jBDF/PPOEcOD1WPsjtA024rbaGg RW6Z8vD1N9gm7sV2rILm8He+3FRQHHzPtVOtU4dN6R1VHwrKWf+4dPdPdtt3JgCwuS 6gEZGd4qfcvTw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E9CB218054F for ; Thu, 20 Nov 2025 14:22:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) 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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (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, 20 Nov 2025 14:22:13 +0000 (UTC) Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-b735e278fa1so192528766b.0 for ; Thu, 20 Nov 2025 06:22:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763648527; x=1764253327; darn=lists.php.net; 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=3EWspKF5vZvTte95YRUFdsayOPaSlG4iy4dp7J5cijY=; b=Wd1W5raVaq4ki8Y6QuGPY1XLAX7bIa8DPA/SwgCLL7g5qNPKPkfYzu0dNzi6Hcynzx hxGB0TrpJ0BQScuyfKl4IffsKw/egNa1nag/Gi10FguwGdSvtn9PqiWPar5CdPN88bXE Jm6VrbXirA2pPH6p5Dh8pwJxpMFU+shoISLcOOhlU7Emz3LqEel+oqtoXnrTL9OdwETy Ass0EcoQyT6CTM2sHR5U1A3ItnlFfK1JDFuzu6Teri/0tsYbYG486Sco/vI6KTKzI4uy a9FM04THLvnjNLlK7lfPRnoVRBH72Gfd1cBLUHsS4EevsjrlDxyGO6PGevSnhwqzPRcx 4Uhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763648527; x=1764253327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=3EWspKF5vZvTte95YRUFdsayOPaSlG4iy4dp7J5cijY=; b=eR3L/NKSXVmrbaLntqJ44ikg9kJ5HlxcWwt0zmPCJoKbw2yk81Gs6JUEmFQhesPDso 1OQz4wtpYh3tpRMZdYyjpwm//TVoocf25ELHiomlP9to/UfdaaEqjC6VQwHYTq9l23RI REKzfDkZcn6qfOKi1l/xKdUYNTU236+8IlYh4fnmlPNST4812zlr5RP2WVync++6gkLx xpQs5JzqTzc3T1E7K1cDKusK/V+nmOmFY/oqzacB0vB0vmTJDkHiPfcloowyc7xo6QBs tj+M1j9D6xGqMMiTBUx9Ha6lseKKVPwfURvYNU3YcyBXJPT1DLDovh40cEqegtKRlyf4 6ENg== X-Gm-Message-State: AOJu0Yy8ZQTIQ+3SGro8/UvBAndf1pjfYGROK1DSvEoo1uZ+Y+035YuZ HcGxo9HrlmDvn1Cv8YG6h4rvO8BI4S95Fjfhkhtgo1lapONtypqDOs1q8L8EO4i3InUPcqPvA/F bKW7nUTdyMvpWcf8BkrsxqgKIX10fO0YrQVdX X-Gm-Gg: ASbGncu3PjIiWCMH64qbT+B3gJUlMhkjKeLRl70dul7QCe7zdnSvcGns0k0N9GpjMeH PiQO5FGimjIgyVmDZxWNcjLyeTNDGg3zX7rzdAzNPiDup3o7RJQzopUW+O9pG7lZom8KuNcghYV wwM7lUnOY7zrD969LlIocJfJG0p8m/YXl9drA90LgljlzGc8G5QPQMZzsSd6SGgUOeP+H4U/rax sdE6ZOLGT+jubYKnfwIcbL5mdxl6kA4hOpPQ7uOiDoh2H0wyrcQ/dcvUJ7Fow8PkLhpx4E= X-Google-Smtp-Source: AGHT+IGgaJKP6Jk9Gck46/NFDTuq9+jiDrzw29HfBQPpd5cD9hZNfVO/Qlda32Hco3aelcE6mcxAY7lOYFlXJyMX+to= X-Received: by 2002:a17:907:1c28:b0:b74:9862:3e36 with SMTP id a640c23a62f3a-b7655029955mr372920666b.51.1763648527260; Thu, 20 Nov 2025 06:22:07 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 20 Nov 2025 15:21:55 +0100 X-Gm-Features: AWmQ_bkFx2-ETLUWX86nxHrDI6oGq14DwNe3TsdMK5fdlvzGpxayhlhKEyMbsrc Message-ID: Subject: Re: [PHP-DEV] First-class constructor callables To: Valentin Udaltsov Cc: php internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: arnaud.lb@gmail.com (Arnaud Le Blanc) Hi Valentin, On Thu, Nov 20, 2025 at 2:20=E2=80=AFPM Valentin Udaltsov wrote: > Question for Larry and Arnaud: > > In PFA v2, you note that constructor references pose significant technica= l challenges. > Could you elaborate on what those challenges are and whether they are fun= damental, or potentially addressable with a more limited or explicit syntax= such as `new Foo(...)`? One issue is that partial application needs to resolve the function being applied, but constructors can not be resolved without instantiating the class first (at least, not on all classes). So `new Foo(...)` would need to instantiate Foo, resolve the constructor, and discard the instance, before creating the PFA. This is something that could be addressed as a follow up to PFA v2. Best Regards, Arnaud