[erlang-questions] Erlang way for process-as-library?

ok <>
Tue Apr 24 00:53:24 CEST 2007


On 6 Feb 2007, at 2:17 pm, Robert Baruch wrote:
> Now, the next question I have is: is there an Erlang way to forbid
> "ordinary users" from calling the server's callback functions
> directly (e.g. init, terminate, and so on), while allowing gen_server
> access to them?

Too many years ago I proposed adding

   -export_to(Module, [F1/N1,...Fk/Nk]).

to Erlang (rather like Eiffel {} export controls) so that some functions
could be provided to one specific module without providing them to every
module.  If memory serves me correctly, I also sketched an  
implementation.




More information about the erlang-questions mailing list