[erlang-questions] Why do we need modules at all?

Bengt Kleberg bengt.kleberg@REDACTED
Tue May 24 15:07:08 CEST 2011


Greetings,

Perhaps it is possible to do parse_transform when loading, but I have
only heard about this at compile time. I meant a way to load modules,
not compile them.


bengt

On Tue, 2011-05-24 at 13:21 +0200, Tim Watson wrote:
> On 24 May 2011 11:39, Bengt Kleberg <bengt.kleberg@REDACTED> wrote:
> > Greetings,
> >
> > It would be very nice to have module renaming/namespacing that allowed
> > me to do the following:
> > The modules "misc_lib" and "misc_lib_helper" from developer A should be
> > able to call each other with their original names.
> > The modules "misc_lib" and "misc_lib_helper" from developer B should be
> > able to call each other with their original names.
> > I should be able to call all 4 at the same time with names that I have
> > create/renamed.
> >
> > So, I need to load modules as a set/application/??? that renames them
> > outside of that set (it would be ok to have the same prefix added to all
> > of them), and still allows the files in the set/application/??? to keep
> > using to the old names.
> >
> >
> 
> I was thinking about this in terms of some kind of special -import or
> -alias directive. I think it's possible to do just with a
> parse_transform, as long as the set can be fully determined at compile
> time. That last point though - therein lies the rub. App-upgrades
> change things, and those things can include modules. Dragons.
> Nuff-said.




More information about the erlang-questions mailing list