Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105130 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 16152 invoked from network); 7 Apr 2019 13:58:12 -0000 Received: from unknown (HELO mail-oi1-f194.google.com) (209.85.167.194) by pb1.pair.com with SMTP; 7 Apr 2019 13:58:12 -0000 Received: by mail-oi1-f194.google.com with SMTP id y84so8234680oia.12 for ; Sun, 07 Apr 2019 03:54:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=A566Vql440dmZZjRhYt2oA/33vBe/U8rhwDFAMDL7Ks=; b=SoMiWtMswBAurQZSq6vhXYykTYqJoYKkFEe7nnwk3/3lHovL4vMvtzPUln1YNF9NZF NU7v0+GjBBTdjSUstOIj9N5UnbtrEHvh/ErY0DYsbUiohbddO5pd0rvkfyg8o38Q+WAg fxOUq2yIj/NOfOzMkPuOWwDediDl6OmlIgu9aSip+P/KEAW6i6MSdrFU4XZr+Cv0UnY6 2ivFlaOQTVnQF/NfJffy4EGmtzDeZEjIMUifiL843OobW47pFg5JbW6mUyHvYYIffoKA hSOqx2dwCcDPF/8GMQhMulNnm2LAWV5LGj2HEM71TrPuRTwFpE3l8p3E0EzmtWNTFiyq HQUQ== 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=A566Vql440dmZZjRhYt2oA/33vBe/U8rhwDFAMDL7Ks=; b=Frc/4H/Q4AxHzmbqAopsUkm09MaULOyduKdhVjo1TtWm6B6WZuKS0Jn536yOz0KnXD jp7q2SMSOU/MWEHWsNwX4dMjaZCvzvr3/RoqdLcPWw9aX7dfsoLO+aBarmjXJmf0ClPA KVQnMt+6aZgBGTY9Ae/j143TUAQsKmvc6MQV5EhCA+pW9MpYXbESCahicaP9Yct2u8qr JpCyRMctKc3AYa/5pMTNPIY1as+TiNltmZkVdAMMnyRjp78CL0RhO7b2DgPKLcIS2hld 8VX0dJutCNHRju/rZ3UaKoREx9+XSoItDjCNu/bYUlJ5xOo6sXGBquae8ce/+tBj15Fx 01xw== X-Gm-Message-State: APjAAAVaPn5rtIsiYy5GNqIMFQ3wsopvFeF+b/3mNjHHx5zRG/uVCDx4 M2+aVWnrIUf9utr0+Hpf3zrGXZ8HIg9ZR7mS+4U= X-Google-Smtp-Source: APXvYqyut16r+Wo9IDHH11X83DPEqiAokAvRYO8Kybs4fGiCrcy70xImlx3Z1stnC6fCSGWKlKnh//qj4U/a1/IjGaU= X-Received: by 2002:aca:304e:: with SMTP id w75mr13326332oiw.176.1554634473522; Sun, 07 Apr 2019 03:54:33 -0700 (PDT) MIME-Version: 1.0 References: <00ab01d4ecfe$e0b03680$a210a380$@jhdxr.com> In-Reply-To: Date: Sun, 7 Apr 2019 06:53:56 -0400 Message-ID: To: Rowan Collins Cc: Internals Content-Type: multipart/alternative; boundary="0000000000008cc9a40585ee8b61" Subject: Re: [PHP-DEV] Parameter skipping From: morganbreden@gmail.com (Morgan Breden) --0000000000008cc9a40585ee8b61 Content-Type: text/plain; charset="UTF-8" >In order to use named parameters, somebody needs to have declared what those names are, and made them a stable API. If they're automatically supported on existing functions, the author might not intend them to be used, or even realise they can, so not keep them stable (I tend to think of parameter names as local, not contractual). Wouldn't using the name of the variable that is already used for its function signature work perfectly fine for this? This is how IDEs already hint for function call completion. On Sun, Apr 7, 2019 at 6:26 AM Rowan Collins wrote: > On 7 April 2019 06:00:53 BST, CHU Zhaowei wrote: > >The [named parameters](https://wiki.php.net/rfc/named_params) was > >proposed in 2013. Does the problems which stopped us before still exist > >in 2019? Since we all agree named parameter should be a better > >solution, why not take a look at it first? > > I'm not 100% convinced named parameters are the solution to this problem, > in all cases. > > In order to use named parameters, somebody needs to have declared what > those names are, and made them a stable API. If they're automatically > supported on existing functions, the author might not intend them to be > used, or even realise they can, so not keep them stable (I tend to think of > parameter names as local, not contractual). > > To use a default-skipping keyword, you need no extra promise than that > already made, namely that the default for any parameter is a valid value > for that parameter. > > Regards, > > -- > Rowan Collins > [IMSoP] > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --0000000000008cc9a40585ee8b61--