[erlang-questions] Some ideas for the shell.

Richard A. O'Keefe ok@REDACTED
Thu Dec 7 02:23:57 CET 2017

On 6/12/17 1:59 AM, Richard Carlsson wrote:
> You also have file:eval/1 and file:script/1. (And "path_..." versions of
> the same.)

Yes, but file:eval/1 does something *DIFFERENT* from what
the shell command include/1 would.  And so does file:/script/1.
There is much overlap, but they are not the same.
If the argument is to use one of those functions, that won't fly.
If the argument is to use the *name* eval/1 or script/1 in the
shell for what I want include/1 to do, yeah, sure, why not?

You see, the thing is that include/1 is supposed to read a sequence
of full-stop-terminated forms from the named file, and process them
*as shell commands*, some of which are normal Erlang expressions,
and some of which are *not*.  I mean, I did know about file:eval/1
(but admittedly not file:script/1) and there's a reason I wanted
something else...

More information about the erlang-questions mailing list