export_to (Was: Re: the OO metaphor)

Erik (Happi) Johansson happi@REDACTED
Mon Dec 4 10:56:19 CET 2000



Håkan Mattsson wrote:

> On Fri, 1 Dec 2000, Richard Carlsson wrote:
>
> Richard> This should not be needed, since you can nowadays write:
> Richard>
> Richard> 	spawn(fun () -> my_nonexported function(X1, ..., Xn) end)
> Richard>
> Richard> There should now be no reason to export a function name
> that is not
> Richard> expected to be called from other modules.
> (Counterexamples, anyone?)
>
> What about code change?
>
> In order to manage code change without killing the process, fun's
> should only be used for short tasks. By using a fun as the topmost
> function in long lived server processes, you will effectively force
> a kill of the process at next code change.

No, not if the fun only does a tail-call to the server loop.

/Erik




More information about the erlang-questions mailing list