Warning: reply is O.T.

Adam Maccabee Trachtenberg wrote:

On 14 Oct 2003, Robert Cummings wrote:



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!?



Following that logic, why would anyone prefer one Turing-complete language over another? They only differ in their syntax. :) Okay, this is an extreme example.

However, I think it is safe to say that language syntax and grammar
cause users to exhibit a tendency to use one set of techniques in
comparison to another.

As a general rule, PHP's operators (i.e. funny looking punctuation)
are easily recognizable basics; its functions (i.e. letters with () at
the end) are ones that need more clarify of identification at the
expense of extra letters. (Not exactly, but I'm generalizing here.)

I guess the real questions here (to me) is are regular expressions a
common enough action and is "=~" a common enough symbol that it's
worth a decrease in clarity? I don't know. Regular expressions have
certainly shown their frequent usefulness. I've always hated =~ as a
symbol, but with Perl's popularity, it doesn't really makes sense to
choose anything else.

In the 70s, regular expressions were expensive, so languages like C
didn't include a regex operator. Why should we be bound by the
decisions of K&R and strongly typed languages? At some point,
languages moved away from the Lisp camp, where everything was a
word. Lisp is super verbose, but I don't see people advocating for a
return, even if we got rid of all the stupid (()())s.

"don't see people advocating ..." - Here in php-internals? Read comp.lang.lisp :)
I personally think that language with only () for
syntax have it's pluses so it can not be called
stupid but rather "strange choice" because you
wouldn't choose it.



As Dave said, we added === when no other language in the world has that. Why would =~ be necessarily more confusing?

-adam





--
NetCat



-------------------------------------------------------
VIRUS-Free 10mb Free email + Antivirus + POP3 + more...
Get it at http://www.doal.co.il:81/free/?c=all-virus

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



Reply via email to