POV-Ray : Newsgroups : povray.off-topic : Other people dislike regexes too : Re: Other people dislike regexes too Server Time
29 Jul 2024 08:22:19 EDT (-0400)
  Re: Other people dislike regexes too  
From: Warp
Date: 17 Jul 2012 06:03:49
Message: <50053884@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> Well, you can say "I estimate that it's X", and I can say "well I 
> estimate that it's Y", and without some actual facts to back any of this 
> up, it's a bit of an empty discussion.

The difference is that I have actual extensive personal experience using
systems where regexes are very commonly used, and with people who use them.

Now, granted, I really don't know if you are really a unix guru who has
been using unixes all of his life, but I have got the impression that
you aren't.

> Also, if the most common search terms really are just literal strings, 
> that doesn't really prove that regexes are a valuable search tool. It 
> proves that /literal strings/ are a valuable search tool, no?

Please read again my original reply. The beauty of regexes is that if you
want to just search for a literal string, you usually need no ancillary
syntax at all, and if you need a simple wildcard or other simple pattern,
the search string still remains short and simple. And these two are by
far the most common usages for regexes.

A search (or other pattern matching) system that *only* supported literal
strings and nothing else would be significantly less useful.

> >> Or how about
> >
> >>     dmesg | egrep '(s|h)d[a-z]'
> >
> > If you want to build your straw man, at least use examples that conform
> > to your straw man. That's a bad example because it can be understood in
> > about 2 seconds.

> OK, so what does it do?

I can't believe that you are arguing that a regex is complicated because
you have never used regexes and don't understand their syntax.

Imagine this:

A: "Haskell sucks. It's really hard to understand!"
B: "How much Haskell have you ever written?"
A: "I once tried to write one small program but couldn't figure it out."
B: "Right."

Don't complain about the complexity of a syntax if you haven't even
learned the syntax.

> Come on, regexes are the number one use-case for the entire Perl 
> programming language.

If you want to complain about perl, then complain about perl.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.