Calling internal functions - foo::bar() ?
Thomas Lindgren
thomasl_erlang@REDACTED
Tue Mar 1 15:13:21 CET 2005
--- "Richard A. O'Keefe" <ok@REDACTED> wrote:
> Rather than have a way to call non-exported
> functions, wouldn't
> it be cleaner to do what Hugs does, and let you
> choose in the
> shell which module to be in? (The :module command,
> if you know
> Hugs.) That is, each expression you type in the
> shell is
> evaluated inside the scope of some module, and you
> can change
> which module that is.
Sounds good to me. An interim solution might be to do
the following:
- if local call f(...) is a shell default, use it
- otherwise, prepend the "current module" m, and call
m:f(...)
That way, we can leave calling of unexported functions
for later.
Having :: could be used in regular code as well; it
might be preferrable to export_all, not to mention the
"internal exports" one is forced to do. For one thing,
it's easier to check.
I recommend including :: as an experimental extension
before casting it in stone.
Finally, I currently prefer to use the following
idiom:
% erlc +export_all mod.erl
rather than inserting it in mod.erl
Best,
Thomas
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
More information about the erlang-questions
mailing list