lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I am always confounded when people suggest that perl is a step up from awk, useful when awk has reached its limits.  Instead, the next step up from awk is lex, which provides the same pattern-action paradigm, the same use of regular expressions, and much of the same syntax in its action statements.

On Mon, Mar 7, 2011 at 9:29 PM, Miles Bader <miles@gnu.org> wrote:
kevin beckford <chiggsy@lazyweb.ca> writes:
> That's it. Ten years ago, awk was ten years obsolete.

Hardly.  Awk is an elegant and expressive little language, especially
for a certain (fairly common) problem domain.

As it is still useful, it's not obsolete.

> I hate to come to the surface in this fashion, after cheerfully
> lurking for weeks but awk?  Over perl?

Perl's far more featureful, but it's a horrible language.  Within its
domain, awk is much nicer.

For more complex programs, of course, awk's limitations can be annoying,
and something like Lua is often a better choice.

-Miles

--
Dictionary, n.  A malevolent literary device for cramping the growth of
a language and making it hard and inelastic. This dictionary, however,
is a most useful work.