POV-Ray : Newsgroups : povray.off-topic : Other people dislike regexes too : Re: Other people dislike regexes too Server Time
29 Jul 2024 08:21:44 EDT (-0400)
  Re: Other people dislike regexes too  
From: Invisible
Date: 19 Jul 2012 06:53:34
Message: <5007e72e$1@news.povray.org>
>>>>      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.

Imagine if instead, somebody had written

   oneOf "sh"
   char 'd'
   letter

You don't even need to know which parsing library or what programming 
language this is to figure out that it matches three characters. (Or 
maybe do you. It's perhaps not /completely/ obvious what the final line 
does.) There's barely anything to learn.

It's a lot more typing, of course. But personally, that doesn't bother me.

>> 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.

Have I ever mentioned that I also really hate Perl?

Of course, the only reason that anybody ever uses Perl is because it has 
built-in regex support. This, together with low-level text munging, is 
literally ALL PERL DOES! >_<


Post a reply to this message

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