Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100415 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50727 invoked from network); 6 Sep 2017 12:31:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Sep 2017 12:31:17 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.54 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.54 mail-wm0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:33271] helo=mail-wm0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3B/55-10715-49AEFA95 for ; Wed, 06 Sep 2017 08:31:17 -0400 Received: by mail-wm0-f54.google.com with SMTP id f145so16447360wme.0 for ; Wed, 06 Sep 2017 05:31:16 -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=dNLZ2S/CLOQfa/UF4qDpD9YCR9MjyMQ/BnPkzdDhc9U=; b=roPnzG9f+ng+k8XxLWqdOwKd9V4tvfPdna1textim0Oj+2UyiqFUog1g41+XUb19Hm 5AjaDJTUMc/0X7NBrvfLVT11kiUXGnAglkwa12tyI/fpDvk5HU69ni+Cg14Y+Ii4l+RL EIMPyQtbpU4pN3hN2YbKKN0ovet+lPPK2bjbTqlv0BmiyHDxPpuYUtF7EFulQujespYe lNYDEhvmErD+z2Dg1xguAvNXwdhtgHBtv3x1nYxZ7NMEuLgSAFAO9O6c67CmuIMV8Tw7 G3dixmKDll71kWriGKVEaBbzGlPPDcICd2MxFkf6JNsm2dR5Sf6KWjqqylregbG82gxk Wz9A== 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=dNLZ2S/CLOQfa/UF4qDpD9YCR9MjyMQ/BnPkzdDhc9U=; b=O2VKdZibaExNytVBzQ+AJ+t3oVW2TMB4v56WdaNhyxN1vI+x2ulYKmPE7ANo69GvDo tuK373QK4r/9n7IJ1N13VQGp0JxF5JBDRc28fNvXF0szMwzyEI/iK0cwu8Zlf2W/l7t/ gUnqViECgTqw9bYOsnoeC1xtu6y0V5H+xjVXdzboALl/B9tWOkd5a4wmlC9idb54UPd4 HJEZol6KkApVsRhXz0Kx5I66IUBbazWAk5SuOezRIbVEdEDf3PyphMUPmzShQb4/hXPE J4X3fYPzWY6gRPMm08BiCnMsjMDw1FUpKPxO8ENAQgnNa+n8hU6mqL52bZFguPdIOA5V u1Dg== X-Gm-Message-State: AHPjjUh1JWsZbqmnT8EFCINco8qsKwtj4EEdgmO4mv7CidKQDEMYuBlG dwwsuRuK8ODxNMokIss= X-Google-Smtp-Source: ADKCNb7r4/qZqLHXqVQNrqFALmCJ/Z3NXaxFpNWOYWPKVF2O9Rbf/UYpjg7/SzxBtLRoI9GPp9crCw== X-Received: by 10.28.156.198 with SMTP id f189mr4973wme.28.1504701073357; Wed, 06 Sep 2017 05:31:13 -0700 (PDT) Received: from [10.145.29.49] (92.40.249.176.threembb.co.uk. [92.40.249.176]) by smtp.gmail.com with ESMTPSA id 25sm4860047wrv.8.2017.09.06.05.31.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Sep 2017 05:31:12 -0700 (PDT) Date: Wed, 06 Sep 2017 13:31:04 +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 12:38:03 BST, Dan Ackroyd wr= ote: >On 6 September 2017 at 12:15, Rowan Collins >wrote: > >> If you have suggestions for how the format should look > >Don't use a format=2E Just write code - see below=2E 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=20 As soon as you have some shared functions, you have some design decisions = about how those functions are named, what arguments they take, etc=2E When = used for a lot of variables, that will resemble some kind of DSL, and that'= s all I meant by "format"=2E=20 >This type of library should be done in PHP, not in C=2E I can certainly see the argument for that=2E In that case, how would you l= ike to see the language evolve: Should we deprecate ext/filter, to encourage people to use better implemen= tations in userland? Should the language include some set of basic primitives that these userla= nd implementations can use, rather than having to endlessly reimplement thi= ngs like a regex for detecting a valid integer? Or do you view ext/filter's current scope as about right, and it should be= neither extended nor reduced? Regards, --=20 Rowan Collins [IMSoP]