Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74483 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87653 invoked from network); 26 May 2014 07:23:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 May 2014 07:23:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.174 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.174 mail-qc0-f174.google.com Received: from [209.85.216.174] ([209.85.216.174:42209] helo=mail-qc0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 18/34-60353-40CE2835 for ; Mon, 26 May 2014 03:23:48 -0400 Received: by mail-qc0-f174.google.com with SMTP id c9so3605543qcz.33 for ; Mon, 26 May 2014 00:23:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=cHB9Ym0tBrLIdV0d7KOGgQjPnYi+mu7iSqxFp+FMQzs=; b=I3+ZX74OytR7GS/VZaG9z4kewUE7NJRjx2fkBeQpbeaBPgds+Nczit8N/680+0H8w6 gOk0HYOquu1cPGIB09HOdqYRwlsOsRhC8yFyKKTPCVzM00UflVGJLwrDfuGvPcdMbDoE lZQLNGq8qJKeun/jXputtvi1TCOiMjpR7TQxYMQ9faGqbK9kC3FrvTecXMl88UKQgfmw EAD6eGkbJ+JtPAuUg8lgbySRq2dBb6mWa4BJl6dqaRkMMo5aVQsCQt9keh7f/PBUWJW8 WZ0aky6cirC+O8BqeRkU7Xn/AJfx0UYhX/tnGRSk/bRtjshAoKEJdFysdPTIJVUvFs8U aT7Q== MIME-Version: 1.0 X-Received: by 10.229.79.2 with SMTP id n2mr29640126qck.11.1401089025705; Mon, 26 May 2014 00:23:45 -0700 (PDT) Received: by 10.140.47.231 with HTTP; Mon, 26 May 2014 00:23:45 -0700 (PDT) In-Reply-To: <67d97efff27b61e45ef74d4f4339b4b3@mail.gmail.com> References: <-6285448086228171932@unknownmsgid> <67d97efff27b61e45ef74d4f4339b4b3@mail.gmail.com> Date: Mon, 26 May 2014 09:23:45 +0200 Message-ID: To: Zeev Suraski Cc: Dmitry Stogov , Xinchen Hui , PHP Internals , Bob Weinand , Stas Malyshev , Andi Gutmans , Nikita Popov Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] RE: [RFC] Fast Parameter Parsing API From: pierre.php@gmail.com (Pierre Joye) On Mon, May 26, 2014 at 9:17 AM, Zeev Suraski wrote: > I think the main challenge is the fact it turns what today is a one-liner > (albeit a bit obscure) into a long multi-line all-caps gig. I=E2=80=99v= e tried to > think about alternatives but so far came short with something that > elegantly solves the problem, short of using C++ which I think goes too f= ar > in the context of what we=E2=80=99re trying to achieve. > > > > I=E2=80=99ll do some more thinking=E2=80=A6 One thing I did not look at yet (too many things to catch up with :) is how we could solve two problems in one shot. Hannes and other mentioned the pain it is to maintain the parameters information in two or three places, reflection structs, inline doc and zpp. It could be possible to use the reflection struct for argument parsing, while adding support for types and maybe named arguments while being at it. Just a thought, I have to investigate this idea, or anyone else with some more available time :) Cheers, --=20 Pierre @pierrejoye | http://www.libgd.org