[Haskell-cafe] feasability of implementing an awk interpreter.

Roel van Dijk vandijk.roel at gmail.com
Mon Aug 23 03:00:16 EDT 2010


On Mon, Aug 23, 2010 at 8:07 AM, Richard O'Keefe <ok at cs.otago.ac.nz> wrote:
> But what _is_ "the core functionality".
> The Single Unix Specification can be browsed on-line.
> There is no part of it labelled "core"; it's all required
> or it isn't AWK.  There are weird little gotchas like
>        File "foo" = '{ prin'
>        File "bar" = 't 2 }'
>        awk -f foo -f bar
> is legal and is required to act the same as
>        awk '{ print 2 }'
> mawk fails this, and I don't blame it, and I don't really _care_.
> Is that "core"?  Who knows?

I say that that behaviour is not part of the language but of the runtime.

> Whatever the "core functionality" might be, YOU will have to define
> what that "core" is.  There's no standard, or even common, sublanguage.

One approach to find the core of a language is to find which parts can
be implemented in terms of other parts. If part B can be expressed in
terms of part A then B doesn't belong in the core.


More information about the Haskell-Cafe mailing list