Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100426 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87986 invoked from network); 6 Sep 2017 22:47:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Sep 2017 22:47:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.49 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.49 mail-wm0-f49.google.com Received: from [74.125.82.49] ([74.125.82.49:38142] helo=mail-wm0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E0/6A-10715-11B70B95 for ; Wed, 06 Sep 2017 18:47:45 -0400 Received: by mail-wm0-f49.google.com with SMTP id 187so821009wmn.1 for ; Wed, 06 Sep 2017 15:47:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:cc:from:message-id; bh=V7rbF3xt6nMshcyB8fAxOfswsb1UW7r5jUh46MjFFFY=; b=LXo88aUJzL0TCXLVugPtZfjzJLD5EiwlpUhpgm7k+mCxNk/Ml92PmK2hQeF6jTCfby 9tPEQsSV3alwN4RIBpcrNp5dzB5IelEQuVKW1jFzkJ3G8nlZnDieNVwBT9h7oM6pB5n9 Ytu8YDiHKHJei0/ZYNosIymckxqeNSfEqqfK4Xey7iEnZCNaNt+//Z7CjAIXzw/AP0gt iwCZgvif/6N7gWi5rIE7N8P1Rnz4LcJqHQKgZbgPAsOYIy1MoaUaNmFG2ryE0sbF7eit /tYRKW2KFcVrpeELMgIfIskB2arcGBMFJ76JsW4FbYP3ou/PjLCYU1BxQW7Wp9WcQQx/ URFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:subject:cc:from:message-id; bh=V7rbF3xt6nMshcyB8fAxOfswsb1UW7r5jUh46MjFFFY=; b=E5L+7c/ne+6cV+LHwh+LSidGcuvj8eUILFyxlrrvmgqzlgw12AEVusAbWAik22Prpi SksYED1p9FKWXlhGrLa6k4G6X5iqhTwY8kjbQqaWizOIIyrTitrBzyLdU6BB/OwmUSaG sCoMKc/+cSArlNP/Vv09xyyPYG2Ww525ZkPh4aLT2xUgPqVy7JoYeha7j1Qhb5xaZmve HPyg/JG4ZHJQTPdcxdGwr/oChAhPaVkjAWom4qulhiHJQI/kta12BmLvpxUyBjXf/SzD yqxkC9GtYUubxyNFzI0C8z6hV26WrivB/uKrEzt1oCqShEKMrrnRAL8Y4uDGAX6urfAx yopQ== X-Gm-Message-State: AHPjjUg/ZHcyIiNIc3WpBjr2dYhDMO1eNxXVOa5h+8jRJNO5h7/v1pHz sfC6KvlhDUKHeHBb X-Google-Smtp-Source: ADKCNb7pcVl3UoOIgEkitN+KDpGjd01Ww6fkyHAtJbG625yEiM6ZRKCOAKjg3e8zroTNKVIVn8qjnQ== X-Received: by 10.28.154.88 with SMTP id c85mr854987wme.59.1504738061961; Wed, 06 Sep 2017 15:47:41 -0700 (PDT) Received: from ?IPv6:2a00:23c4:4b81:ae00:316a:3d9e:3b58:5a05? ([2a00:23c4:4b81:ae00:316a:3d9e:3b58:5a05]) by smtp.gmail.com with ESMTPSA id b127sm2153409wmc.34.2017.09.06.15.47.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Sep 2017 15:47:40 -0700 (PDT) Date: Wed, 06 Sep 2017 23:47:38 +0100 User-Agent: K-9 Mail for Android In-Reply-To: References: <0C7F986C-B0BC-4315-98ED-B4FD003B9399@gmail.com> <2a4491b4-e6f5-4297-beec-363f373a93e6@lsces.co.uk> <3f8be7b1-0e59-21c6-4fe8-8299b2c05645@rhsoft.net> <6ba62d62-f1ab-9e7b-93f0-a1a9238c47a6@lsces.co.uk> <0db9cfa3-2b31-ee41-713c-889b7cc06406@lsces.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable CC: PHP internals Message-ID: Subject: Re: [PHP-DEV] A validator module for PHP7 From: rowan.collins@gmail.com (Rowan Collins) On 6 September 2017 21:33:53 BST, Dan Ackroyd wr= ote: >On 6 September 2017 at 13:31, Rowan Collins >wrote: >> I'm going to assume that the code you posted was something of a straw >> man, and you're not actually advocating people copy 20 lines of code >for >> every variable they want to validate=2E > >You assume wrong=2E No it's not, and yes I am=2E > >I can point a junior developer at the function and they can understand >it=2E > >If I ask that junior developer to add an extra rule that doesn't >currently exist, they can without having to dive into a full library >of validation code=2E I can certainly agree that a complex DSL might be more pain than it's wort= h, but copying around a regex and all its scaffolding is surely worse than = a clearly named function like validate_non_negative_int? That's why I asked in my last email if you thought ext/filter should be re= moved, and perhaps replaced by some more straightforward primitives, or jus= t left as it is=2E If a broad strategic question like that feels too much l= ike "wasting time on the list designing features" to you, I'm not sure what= you would find acceptable discussion=2E Regards, --=20 Rowan Collins [IMSoP]