Making it an "optional" feature wins the prize for today's worst idea.  
So code written with this option turned on will not run on a server with
it turned off?

And telling people that they simply shouldn't use it if they don't like it 
doesn't help anybody.  If it is there, some people will use it and other 
people will have to read that code.

We have enough operators folks.  Regular expressions, especially since we 
have two different varieties of them, are confusing enough as they are.  
let's not add to the confusion by obfuscating the syntax around them.

For example, what would =~ do when you build PHP without PCRE support?  
Would it simply not work?  Would it fall back to Posix-style regex?  Why 
should PCRE-regex get an operator and Posix-style shouldn't?  So we need 
two different types of regex operators?

-Rasmus

On Tue, 14 Oct 2003, Red Wingate wrote:

> Why not just allow this as an optional feature, i don't see any reasons to
> keep this out as it doesn't affect any performace and can maybe help some
> old-skewl PERL-Coders to convert over to PHP.
> 
> One of the best features of PERL is the tight connection between regular
> expressions and the scripting-language. Developers that don't want to use
> this kind of features might just skip it, but some others will surely like
> this
> option when coding.
> 
> > On Tue, 2003-10-14 at 14:14, David Sklar wrote:
> > > On Tuesday, October 14, 2003 1:10 PM, mailto:[EMAIL PROTECTED] wrote:
> > >
> > > > You are pushing towards
> > > >
> > > >   $_~=/^\.*?\$$/;
> > > >
> > > > This is not human-readable code and one of the basic characteristics
> > > > that sets PHP apart from Perl.
> > >
> > > Actually, I'm pushing towards
> > >
> > > if (! ($_REQUEST['email'] =~ '/[EMAIL PROTECTED]@([-a-z0-9]+\.)+[a-z]{2,}$/i')) {
> > >    $form->addError('Please enter a valid e-mail address.');
> > > }
> > >
> > > There's not much we can practically do about the punctuation density of
> > > regular expressions, but we can make their use more widespread by
> changing
> > > the syntax of how they're invoked.
> >
> > Why would this make regular expressions more widespread? I would expect
> > that regular expressions are used wherever necessary and otherwise not
> > used, regardless of syntax. Or are you saying because regex matching is
> > invoked via a function that you don't use regex? In such a case I'd have
> > to ask what you use instead!?
> >
> > Cheers,
> > Rob.
> > -- 
> > .------------------------------------------------------------.
> > | InterJinn Application Framework - http://www.interjinn.com |
> > :------------------------------------------------------------:
> > | An application and templating framework for PHP. Boasting  |
> > | a powerful, scalable system for accessing system services  |
> > | such as forms, properties, sessions, and caches. InterJinn |
> > | also provides an extremely flexible architecture for       |
> > | creating re-usable components quickly and easily.          |
> > `------------------------------------------------------------'
> >
> > -- 
> > PHP Internals - PHP Runtime Development Mailing List
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> 

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

Reply via email to