Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114469 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 10628 invoked from network); 13 May 2021 20:22:45 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 May 2021 20:22:45 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C4D8D1804BD for ; Thu, 13 May 2021 13:31:03 -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.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (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 ; Thu, 13 May 2021 13:31:03 -0700 (PDT) Received: by mail-lj1-f170.google.com with SMTP id e11so21745195ljn.13 for ; Thu, 13 May 2021 13:31:03 -0700 (PDT) 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=HMcByylWGbIsGy5fs4H4+Zo3zAOnLaRdZoYWNoJHoaU=; b=n83WgZvLksDpC/i5H09WgcCtKdY87GGyqcyB8d64MKkSTO6DPSW7sYrDboe+HQv0W+ c1L5DPmWoXHFlV8HJQgfcxYjXuHGTJra2rO0/UaXjYDNd1JlQwHysY4pdCBMePjc/56t 0TJzH45R85H3lzKgIw7wqjn7VWsT0MaKeM9H9gz8ivTWfGxtOh8+Bp4v+ok/eN/o3yLZ dgU11UFpur4Fdti30GoyA4LIvMdrIdYydOswNsjKwx6DiySUV8YJCbTFLmx6sJCLshxq reESCD1pvINGHvFAySB+TaoynILomu6D4XJ7bpD1UzOBSkwydtvF1k5ibhMacKNETKXk wNSg== X-Gm-Message-State: AOAM531yTObkvL8vtcfGh30enqyZzzpq8+15I8hJCZMWUmnrUBI+OvnX dmygYkQ0Zqm9+Hp+O0/Hmuu0PO5ojH8Ikw2uCgc8KppnDPoj0g== X-Google-Smtp-Source: ABdhPJzFtQ1/Boc7NEMjup6LpKZvLXwA9SeOqBkRn7hXQbj9DjlIaX7b6nT6WXdySiM1QFk5Eqji2OmGL8IJEHnAdUI= X-Received: by 2002:a2e:a379:: with SMTP id i25mr35120931ljn.365.1620937861664; Thu, 13 May 2021 13:31:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 13 May 2021 15:30:50 -0500 Message-ID: To: Andreas Hennings Cc: Larry Garfield , php internals Content-Type: multipart/alternative; boundary="00000000000072a35f05c23c0196" Subject: Re: [PHP-DEV] [RFC] Partial function application From: pollita@php.net (Sara Golemon) --00000000000072a35f05c23c0196 Content-Type: text/plain; charset="UTF-8" On Thu, May 13, 2021 at 2:31 PM Andreas Hennings wrote: > 1. Serializing: > But outside of the above cases it should be technically possible, or not? > > I suspect that the limitations you cite make any kind of general serializing both unreliable and impractical. I wouldn't plan on meaningful serialization. > 2. var_export() > > Same as above, really. 3. Parameter switching > > Could we express the following as a partial function? > > static function ($a, $b) {return foo($b, $a);} > > E.g. as foo(?1, ?0) ? > > Using named parameter we can: foo(b: ?, a: ?); -Sara --00000000000072a35f05c23c0196--