Abstract Modules (was Re: erl_eval.erl : Mucho weirdness)

Sean Hinde <>
Wed May 25 11:35:01 CEST 2005


>
> The abstract modules are so far an experimental feature (they are  
> neither
> documented nor supported).
>
> If we'll keep them (which does seem likely), there will probably be  
> a new type
> instead of a tuple.

I have been starting to find uses for abstract modules, but they  
don't quite do what I want them to do. It is still a requirement to  
pass the reference to the abstract module to everywhere which wishes  
to call it. In many cases it would not be much more onerous to simply  
carry round the initialisation parameters.

I would like to see the introduction of a "Named Abstract Module".  
This could be as simple as an abstract module which once initialised  
can only be called by its normal name. This could usefully have  
"qssign once" semantics - once initialised it would be illegal (throw  
exception) to re-initialise it.

The particular situation I am thinking of is where a large codebase  
must be switchable between different products, and it is not  
desirable to litter the code with ifdefs.

Sean



More information about the erlang-questions mailing list