On Thu, 15 Feb 2001 10:04:51 -0300, Branden wrote:

>Why `do FILE' behaves like eval, if there's eval to do it? Isn't this a
>little too much not-orthogonal? Why don't we require `eval { do FILE }' to
>have the behaviour of not dying and setting $@ ?

The reason for its existence is simple: history. "do FILE" dates from
before "eval BLOCK". The only way it could have been like you say,
would, at the time, have been:

        eval "do \'$file\'";

which is simply horrible (and possibly buggy, if $file contains an
apostrophe or a couple of backlashes).

-- 
        Bart.

Reply via email to