[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Equivalent to scanf()?
- From: Miles Bader <miles.bader@...>
- Date: Wed, 14 Nov 2007 18:30:36 +0900
"steve donovan" <firstname.lastname@example.org> writes:
> Lpeg to read a bunch of numbers seems like serious overkill. Perhaps I
> still don't *get* Lpeg, perhaps I don't think grammar-driven
> programming is a good clear way to do most things.
In my experience, unless your format is completely trivial (only numbers
one per-line or something), using lpeg will almost certainly be less
code, easier to read, far more precise, and faster than than the
equivalent ad-hoc approach.
Quidquid latine dictum sit, altum viditur.