Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109774 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 81751 invoked from network); 22 Apr 2020 15:57:33 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Apr 2020 15:57:33 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5B20A1801FD for ; Wed, 22 Apr 2020 07:29:13 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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-ua1-f43.google.com (mail-ua1-f43.google.com [209.85.222.43]) (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 ; Wed, 22 Apr 2020 07:29:12 -0700 (PDT) Received: by mail-ua1-f43.google.com with SMTP id i5so1826621uaq.1 for ; Wed, 22 Apr 2020 07:29:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zPaCNq64zLR6exO+7rBrbiaoNHAEy0Wbqoyc7EjhONc=; b=tq8O2D/W4YxhdQn7BrH343s2QZ1IAxyVKUV2mRiAXWKzV+uA9mUH0ZVBkC9dsg6KXv p57WELLKf+1+xF8YlLJRrPfpARhwNzlb3wKkk2623Owv9DhdIK6H3dKOg61jtBeLkWBT vzfcii1BP5JjAOOKgpQTvF65akSKXX9GXcy5EdUjC0gBBuknOZYcLh4wLqTbh5bItXWC cLMxQMQA6sYHdpLrtrtD5FxRlFVdXBVytTpmIWdU8CMTTzhpcZuCLt3/b7JQxstF7R2A iJ9p7mjL1vXtvOfXyusnpsMjHtY3DR+YYCvlUa0NTLiBN/xUUPVFxC5lmxdfFoBAgWPK YSgQ== 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=zPaCNq64zLR6exO+7rBrbiaoNHAEy0Wbqoyc7EjhONc=; b=MlDGgPJbnMLIry78BgL56gA62M/xEmYYbv2RQmEbR6x7MmX3JnkzYWacdfIIB8J1L3 IzDGygGkcaylLQSw2yhUaSio+PUY5wpTyWzCcG+eCIfpz9VV1hh5WsQphICBOKE5Pljl PpiNsWPesNzmnp5FLXxtFJ9pPqt4DhPC2e26PMY478qJwoUvhyfyLLJdi/QFwRJhCr4B YAsG62O4dQXrmkh/78vXFAbUn4LBmJVWT4DfY+e7rnglgrOvUSNTyKNCOwuzLlavVYWA 7BksXEeJMv7y2/kadjWj74Jo1MEa7OcCAK0aIcCcFiHNCFe9UpPG6mgdZrPi301/cSK/ NVFw== X-Gm-Message-State: AGi0PuZ2UfHxrjQXLAZvgW3po3ey8uJ1btTVY2Eath4km4SiQUgjTG72 4A3Sc0cW9rc9CAvgEdQT4noOfaqLqml+F4sqDw3qHfC06xw5Ug== X-Google-Smtp-Source: APiQypJIloEAv4dWRyL2jdNweL54L+BBRR+YqfkITXbguted3SJyaUTi3elr8nOOfAVpfWa0kHC/jPiSYd2xSoffiAk= X-Received: by 2002:a67:43c7:: with SMTP id q190mr1762744vsa.183.1587565751808; Wed, 22 Apr 2020 07:29:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 22 Apr 2020 15:29:01 +0100 Message-ID: To: moliata Cc: "internals@lists.php.net" Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Typed callable properties From: Danack@basereality.com (Dan Ackroyd) On Tue, 21 Apr 2020 at 14:08, moliata wrote: > > I wanted to ignite a friendly discussion whether > PHP should allow typed callable properties. IMO no. Trying to fix the problems with callables would be a huge amount of work, and not actually give that much benefit. Even just documenting the problems with callables* is a non-trivial amount of work, and I suspect there are many horrors lurking with the SPL code related to them. > I believe we should look into... I'm pretty sure that choosing a different problem to solve that: * would be easier to solve. * provide more benefit in the long term. * not require breaking a lot of userland + internal code immediately, but instead allow for migration over a longer period. My thoughts on adding 'function types' are here: https://github.com/Danack/FunctionTypes/blob/master/function_type_rfc.md There's still more than a couple of known problems that need to be worked through, as well as probably unknown problems lurking. As email is not a good format for carrying out discussions, if people want to take part in that discussion, doing it in that repo would be better imo. Assuming the problems remaining can be addressed, that would give us a more useful feature, and the existing 'callables' can be slowly deprecated and maybe removed from PHP in the distant future. cheers Dan Ack *[problems with callables] - https://wiki.php.net/rfc/consistent_callables