export_to (Was: Re: the OO metaphor)

Luke Gorrie <>
Fri Dec 1 13:16:31 CET 2000


Sean Hinde <> writes:

> These sort of things would become much cleaner if we had Richard O'Keefe's
> idea of 'internal exports' (so for example the functions currently exported
> for gen_server callbacks wouldn't become part of the API).

Could someone explain to me how in practice you actually get in
trouble from not having export_to?

I think that when I'm looking for a function, I either look in a
manpage (where internal exports should be undocumented), or the
exports in a source file. If I see a comment like "%% Internal
exports", I know not to use them. I can't think of a case where I'd
end up calling something that's not exported "for me".

Maybe if you use module_info/0 for looking up functions you can get in
trouble, but I guess most people only do that for throw-away use in
the shell if at all.

So, is it some quick-hack temptation of "Hey, I could just call
foo:handle_call(...) directly to do this!" that causes the problems,
or is there some more accidental cause, or..?

Cheers,
Luke (who has some hazy recollection of having called a handle_call
      directly, come to think of it.. :-))




More information about the erlang-questions mailing list