On 6 September 2017 21:33:53 BST, Dan Ackroyd <dan...@basereality.com> wrote:
>On 6 September 2017 at 13:31, Rowan Collins <rowan.coll...@gmail.com>
>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.
>
>You assume wrong. No it's not, and yes I am.
>
>I can point a junior developer at the function and they can understand
>it.
>
>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.

I can certainly agree that a complex DSL might be more pain than it's worth, 
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 
removed, and perhaps replaced by some more straightforward primitives, or just 
left as it is. If a broad strategic question like that feels too much like 
"wasting time on the list designing features" to you, I'm not sure what you 
would find acceptable discussion.

Regards,

-- 
Rowan Collins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to