Scripting language in base [was Re: Official request: Please make GNU grep the default]

From: Peter Jeremy <peterjeremy_at_acm.org>
Date: Mon, 16 Aug 2010 19:27:10 +1000
Since this is now well off the original topic.

On 2010-Aug-15 12:57:23 +0200, Ivan Voras <ivoras_at_freebsd.org> wrote:
>This is my long-term point - it really would be beneficial to have an
>alternative, richer language in base which would fall between the
>categories of "a good system language but far too complex for simple
>string-parsing stuff" which is C and "a good glue language for system
>utilities but lacking more evolved concepts" which is shell.

I'd say the bigger problem with C is that its native string processing
capabilities are basically non-existent.  Compared to awk, perl, ruby,
(insert your favourite scripting language here) or even sh, the
equivalent code in C is going to be much longer and less clear.

Note that the system does have a language intermediate between sh
and C - awk.  The main downside of awk is its lack of pipe support.

>default. My current favorite is lua because it's very small and easily
>embeddable and extendable by C code, but there are others - some
>JavaScript engines probably fit the description.

You have previously suggested importing lua.  I'd suggest that all
you need is the killer app written in lua to justify importing it.

Another option might be ficl - the code is already in the base system,
it would just need to be compiled.  Of course, the downside is that
FORTH is a very niche language.

-- 
Peter Jeremy

Received on Mon Aug 16 2010 - 07:27:16 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:06 UTC