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

%glob



it's an interesting one, this - how would it be done? would it have
to be a special syntactic construct, like ~, since the arglist of each
function would have to be rewritten to invoke it? Something like:

echo hello world

goes to

echo <={%glob hello world}

and you don't really want to cause an infinite recursion on rewriting
%glob's arglist to invoke %glob...i don't know anything about the
implementation of the rewriting, but i suspect this wouldn't be a problem.
what *could* be a problem would be the fall in readability of rewritten
code fragments, which are already bad enough. Take an example, a simple
function:

fn sccsfiles { sccs info | sed -e 's/:.*//' }

which is rewritten as:

@ * {%pipe {sccs info} 1 0 {sed -e 's/:.*//'}}

with %glob, you get something like:

@ * {%pipe {sccs <={%glob info}} 1 0 {sed <={%glob -e 's/:.*//'}}}

which isn't wonderful, because of the distance between command and their args.
With large functions, this could be a real problem.