There is more Unix-nature in one line of shell script than there is in ten thousand lines of C. Pozdrawiam, Ćukasz Gruner
2013/1/2 Sam Watkins <s...@nipl.net>: > On Tue, Jan 01, 2013 at 02:13:14PM +1100, Daniel Bryan wrote: >> Bash is my go-to for system scripting, but for something that will run >> 100% of the time on my system for years it's not over-engineering to do >> it efficiently. > > It would be nice to extend C with suitable function and macro libraries, > and a little new syntax (can be done with a pre-processor) so that we could > write compact code in C as in shell. Try setting up a shell pipeline in C, > and you'll see what I mean. There's no reason it should be more > difficult to do stuff in a compiled language, we barely ever use truely > dynamic stuff like "eval" or varibles by name in the shell anyway. > Combined with a good quick compiler or interpreter, we could get a real > "C shell" into the bargain. > > tinycc for example is well fast enough to be used in an interactive REPL > as if it were an interpreter; and that's without any attempt to optimize > by pre-loading headers or whatever. > > Sam > >