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.
- End-of-scope actions: do/eval duality. Tony Olekshy
- Re: End-of-scope actions: do/eval duality. Glenn Linderman
- Re: End-of-scope actions: do/eval duality. Tony Olekshy
- Re: End-of-scope actions: do/eval duality. Bart Lateur
- Re: End-of-scope actions: do/eval duality. Glenn Linderman
- Re: End-of-scope actions: do/eval duality. Branden
- Re: End-of-scope actions: do/eval duality. Bart Lateur
- Re: End-of-scope actions: do/eval duality. abigail
- Re: End-of-scope actions: do/eval duality. Branden
- Re: End-of-scope actions: do/eval duality. abigail
- Re: End-of-scope actions: do/eval duality. Simon Cozens
