[erlang-questions] Defining a module whose functions are locally available in any scope

Tony Arcieri tony@REDACTED
Tue Jan 20 20:13:34 CET 2009


On Tue, Jan 20, 2009 at 2:13 AM, Hynek Vychodil <vychodil.hynek@REDACTED>wrote:

> You can use -import() or -include(). .hrl with in-lined functions or its
> combination and add it in each reia scope/module.
>

I was hoping for a better solution than that.  Specifically I would like to
support code change for the "main" module.


> P.S.: How you will deal with GC of objects when implementaed as processes?
> I have same problem with iterators when try implement as J. A. sugest do it
> as process.
>

Objects aren't automatically garbage collected when they (or rather their
pids) go out of scope.  Obviously this is a departure from OO languages most
people are used to and will require a bit of a paradigm shift on the user's
part.

-- 
Tony Arcieri
medioh.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090120/0b27ddb1/attachment.htm>


More information about the erlang-questions mailing list