Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93463 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22803 invoked from network); 23 May 2016 23:24:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 May 2016 23:24:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=danack@basereality.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=danack@basereality.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basereality.com from 209.85.213.53 cause and error) X-PHP-List-Original-Sender: danack@basereality.com X-Host-Fingerprint: 209.85.213.53 mail-vk0-f53.google.com Received: from [209.85.213.53] ([209.85.213.53:36703] helo=mail-vk0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5D/1F-14293-F1193475 for ; Mon, 23 May 2016 19:24:16 -0400 Received: by mail-vk0-f53.google.com with SMTP id y2so373726vka.3 for ; Mon, 23 May 2016 16:24:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=drVt/1pKD1jeDYyHFtV6BE1TEsIaJs2ULg1PMdDpnyI=; b=lbhbd6d4vEE+kcUWHIL93gt6/uXHcErdYRVYKICUu5mLiRKKfY8nEqj0dT0Chbdk16 MNbsGVgGSkmpgGHTJAiTvPIBk+9K82RURg5jAuqPyleyYjjEEBxSjmGb2TZhIi2+eMLc HFjw556bLYHITgGdxXZhx56/23IvN0nTNlLoVV8tY7mkohfv4vmmQ8XfHmUkfm8wRiPv TA2Av25dV2doeQZ2S/RFraylXS3Ya1tptIv7UL4EQ16NSxkD8rjhzP8S8f2KyoJEvX63 5L2g9FOtv68YHrUdbnyvzT84H2wJj/G+trc+ARUBQ2i7Q2X7yzdQcW+RV0H6QlOTpBJZ jDOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=drVt/1pKD1jeDYyHFtV6BE1TEsIaJs2ULg1PMdDpnyI=; b=Pc4wUgHfdKNM5SGnuMGbp5PIxEdjV7Rz2DNBg+JJb8WS08UmZ16Zo+tHaLRCV1xHvY JUdfgDxPXZcm4FrxLlDBGBrUJu7/RIeP4tdjGMr6qdt3pRbRlKrZX6F8/cVQcUScXs8b yOBc4KqhusnwoiTeBMt2UXnpXmyK8s1TkeVTmt6XGZ8Vzs2x310yEfr06gFL44WzSR8K zfSE36Qxmt6TMsprDDi9D4xPW/+uHg/uBJbOP+ACdXlMvXndKX/etp/cD5VKSNTSyHEo Ug6TWZwAKRSf4v9oF+xxtbfZgVjiX/YegL71EVNH82BYN2l6pQEIvfBq0KLbSm/gTGSX O2SQ== X-Gm-Message-State: ALyK8tKMT0JUSram/VeEjN0YcbcksMJn3FkFJ7IcfvyGimZk7exLcslsNi0suCiK06aJufduiQ3foaHzMXB/YA== MIME-Version: 1.0 X-Received: by 10.31.167.10 with SMTP id q10mr781991vke.44.1464045852944; Mon, 23 May 2016 16:24:12 -0700 (PDT) Received: by 10.176.0.174 with HTTP; Mon, 23 May 2016 16:24:12 -0700 (PDT) X-Originating-IP: [78.147.15.35] In-Reply-To: References: Date: Tue, 24 May 2016 00:24:12 +0100 Message-ID: To: Nikita Nefedov Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] [Vote] Callable types (now: Callable prototypes) From: danack@basereality.com (Dan Ackroyd) Hi Nikita, On 23 May 2016 at 15:27, Nikita Nefedov wrote: > With this message I'd like to go to vote > with the Callable prototypes RFC targeted at 7.1: > https://wiki.php.net/rfc/callable-types To explain my vote - I think we definitely need to be able to specify the signatures of callables in PHP, and I would very probably support either a 'typedef' RFC, or an expansion of current functional type (i.e. invokables) to be easier to use with functions, but I just couldn't possibly vote for an RFC that means people would sometimes write code similar to this: function foo(int $a, int $b, callable(callable(callable(callable(int, int):int $zebranky, int):int $pik, int):int $fot, int):int $zot): int { return $zot($a, $b); } to use the feature of the RFC. I realise that is an extreme case, but I think that splitting where a type is defined (with a name) and the place where it is used to be separate places, is one of the things that the design of PHP got right. It makes it easier to read code, even if it makes the language feel less 'powerful' than other languages. cheers Dan