Calling internal functions - foo::bar() ?

Bjorn Gustavsson bjorn@REDACTED
Mon Mar 7 11:25:00 CET 2005


After some discussion in the OTP group, we have decided NOT
to implement any support for calling a local function.

The reason is that it could prevent us from implementing
(or drastically complicate) future optimizations in the compiler.

(We haven't implemented the kind of optimization mentioned below,
but we hope to do it in a future release.)

/Bjorn

James Hague <james.hague@REDACTED> writes:

> Does the compiler not take advantage of functions being internal to a
> module?  For example, if a function always returns a tuple which is
> immediately unpacked, then the tuple construction can be avoided and
> the values returned in Erlang registers.  At least I recall reading
> about this somewhere.
> 
> If this is the case, then you wouldn't be able to call internal
> functions directly.
> 

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list