Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105124 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 58654 invoked from network); 7 Apr 2019 01:50:01 -0000 Received: from unknown (HELO mail-ot1-f49.google.com) (209.85.210.49) by pb1.pair.com with SMTP; 7 Apr 2019 01:50:01 -0000 Received: by mail-ot1-f49.google.com with SMTP id 64so8794314otb.8 for ; Sat, 06 Apr 2019 15:46:15 -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=x6EGWgTBU4oDI1sNn93OvSyT4oKBDyoBvSqCa+7XrWE=; b=KnF3vLeUwhKoyRNhNFGmcg6mt44wmJC13IQgPFh7mS4P3YTu5P8lrkSs9ynQjyNmrt a0QPgXCfZwxO0ehb8ik12wugYk2GNvjhsBweCjsXagnnykT0jat2O5OHxlCxzPtNbzUU odxZMTRGhmfZXBVZxJ3fzSC4ce5xsFlBySEUP0TKeuTCk/wvrREsd7Jg04I6htIym9ok fWj1zU1xQS29i2vaboJE2l7OuhoYMg54eim2LKqAaAQimxPT6fhKUp3fIRDRqHiRjUTk GQBP5eWA1WSSCpYOJFNyMhCPYMrdS17R8L+KreFzEXqyiMcIyJvAUY68iFjcULG+Yj/S Na7A== 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=x6EGWgTBU4oDI1sNn93OvSyT4oKBDyoBvSqCa+7XrWE=; b=aDaHPpTaDUehiHSxz9dL7q7WMkOTZn8eg+TI58fkjPHoWjUZXJ+KFFm5d8/CWHBkBV WK/bJ76AWptzCoQrN55+E2sWgt40Uo/r2dYtixumXyh4yjqbQnE+GO+zMrKNPOf5IXVF 8hKuXmpoPshW5e3/6l3CnDN3+XwDgkf9Gcp+2ztmHqUIRN4qfKKmp9WspVXCALRJVrQJ ELQMBzRA8MG5pUO7YKskPxqCRFZ2ag6FdJ4ZcigkfSTh9yDILpjMIvz4uihf3c+YOw33 oMbE4gLSfht3cxgjM5CNLiEMTWIywz4B5gJJ9+4qTWiP6mCgdrT1P0TizrES6jvL8NJc KaOA== X-Gm-Message-State: APjAAAVvmVNgQ/W6ca6C/AodWTuki8XHpjzBjYp+NxbTQ+pGrUbJtIsv u+WOLdOpheZYe+UW1wpCUjDXqdmMV43ISTouF5V/oo4x X-Google-Smtp-Source: APXvYqy3d9TOX6dQukf3zR0YdKr06eLlMKDQCDe2+KD+P8bmFiiyKvWbU8FSgeaGyCyC9ddD0dzCqzVaZ5a3pxh0EwE= X-Received: by 2002:a9d:841:: with SMTP id 59mr14816537oty.15.1554590775272; Sat, 06 Apr 2019 15:46:15 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sat, 6 Apr 2019 18:45:38 -0400 Message-ID: To: Craig Duncan Cc: Internals Content-Type: multipart/alternative; boundary="000000000000ee69fe0585e45e95" Subject: Re: [PHP-DEV] Parameter skipping From: morganbreden@gmail.com (Morgan Breden) --000000000000ee69fe0585e45e95 Content-Type: text/plain; charset="UTF-8" The problem I see with this approach is that a keyword for skipping parameters would really just be a stopgap solution until something like Named Parameters can be added. Is it really appropriate to add a feature that only serves a temporary purpose? On Sat, Apr 6, 2019 at 5:15 PM Craig Duncan wrote: > Hi all, > > After starting to use https://wiki.php.net/rfc/json_throw_on_error in PHP > 7.3 I've encountered the annoying issue of having to pass the $depth > parameter as 512 every time I want json_decode() to throw. > > After doing this a few times I remembered the parameter skipping RFC that > Stas proposed a few years ago: https://wiki.php.net/rfc/skipparams > > I've re-read the previous discussion and it seems to me there were two > common arguments against: > * Just design better APIs > * Named parameters would be better > > Nobody has been able to crack named parameters (and it doesn't seem likely > anytime soon), and as we've seen from the JSON example above it's not > always as simple as having better APIs, so I wanted to see whether people > would be willing to support the *default* keyword for optional parameters > now. > > Thanks, > Craig > --000000000000ee69fe0585e45e95--