fun opacity

Peter-Henry Mander erlang@REDACTED
Mon Jan 10 12:09:18 CET 2005


Sorry Vance, hi Raimo,

My new year resolution is to read questions more carefully!

Indeed, if the fun lands back where it originated, there's no reason
apriori that it should not work; the beam/module will be available at
the point of origin, and executing the fun should work. I presume this
is an implementation of a callback, or something like that?

I'm answering to the list too. I'm touched that you all wish to preserve
me from public embarassment, bless you all, but please don't pull
punches like that. As long as it's constructive, I'm happy to be
corrected. Everyone should know by now I'm impervious to intellectual
embarassment; I already know I'm stupid. But demonstrating my stupidity
may actually help someone else to make an intelligent choice.

Pete.


On Mon, 10 Jan 2005 03:55:16 -0500
Vance Shipley <vances@REDACTED> wrote:

> Peter-Henry,
> 
> Thanks for your help but what I was looking at was creating a fun
> on nodeA, passing it to nodeB, nodeB passing it back to nodeA and
> running it on nodeA.  nodeB should not need the module loaded.
> 
> It should work just fine however it is the thread you referenced
> which served to leave me concerned that it might not be that simple.
> 
> 	-Vance
> 

On 10 Jan 2005 09:09:39 +0100
Raimo Niskanen <raimo@REDACTED> wrote:

> Sorry, I do not think the answer is in that thread - that thread
> deals about the pecularities of shell funs in contrast to
> normal funs.
> 
> Concerning the original question; I am not entirely certain, but
> I think the funs are opacue enough. For example the runtime system
> does not try to load the module of the fun until it the fun is called 
> so there is probably no way to [k]now if the fun module exists or even
> if the fun exists in that module other than calling the fun. 
> (or examining module_info for the module, and checking some magic 
> numbers of the fun in the module to see if it is the same module 
> version, arity, etc gory details)
> 
> Try it.
> 
> / Raimo Niskanen, Erlang/OTP, Ericsson AB

-- 
"The Tao of Programming
 flows far away 
 and returns 
 on the wind of morning."




More information about the erlang-questions mailing list