On Sun, 2001-11-04 at 21:00, Todd Gillespie wrote:
> On Mon, 5 Nov 2001, Sean Middleditch wrote:
> 
> > On Sun, 2001-11-04 at 14:31, Todd Gillespie wrote:
> > > You don't know the power of the dark side of regexes.
> > 
> > Would one rather muck with regex's for 5 hours to get the task done, or
> > spend 20 minutes tops writing a simple parser?
> 
> Would one rather spend some quality time learning to use regexes fully, or
> spend an indefinite amount of time debugging your one-off parser?
> 

If it takes more time to make such a freakin simplistic parser, the
programmer should consider a different career.  Jesus, I wrote things
like that when I was 12.  And no, I probably don't know the full extent
of regex's, but since most real code is a hell of a lot easier to debug
and faster and more powerful than what regex's can do, or much less were
designed to, I'll keep regex's where they belong and use some real code
to get the real work done.

> I'm just guessing here, but I bet you personally don't network your apps
> by writing ethernet headers.

No, you're right, I don't.  But what in the nine hells does that have to
with anything?  Whether I write ethernet headers for proprietary apps or
not has nothing to do with the validity of using a regex or eval for
parsing a command delimited string.

> 
> > > I just don't agree that the proper thing to do is to encourage everyone to
> > > write their own parsers for each task.  Most of us are trying to move
> > > *away* from C-style per byte mucking.  Certainly Albert shouldn't ignore
> > > his SAFE flags, but that's hardly grounds to abandon generalized parsing
> > > engines.
> > 
> > If there were an effective generalized parsing engine, it wouldn't be
> > necessary.
> 
> Look around.

Hmm... *checks under the bed*  No, don't see any.  ^,^  Can you point me
to one that works in the given test cases?  One that is simpler to use
than writing an 8 line custom parser?

> 
> 
> And have a nice weekend --oops. Enjoy the week.
> 
>