Calling internal functions - foo::bar() ?
Tue Mar 1 15:13:21 CET 2005
--- "Richard A. O'Keefe" <> 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
- if local call f(...) is a shell default, use it
- otherwise, prepend the "current module" m, and call
That way, we can leave calling of unexported functions
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
% erlc +export_all mod.erl
rather than inserting it in mod.erl
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
More information about the erlang-questions