[erlang-questions] packages (was: newbie: why c.erl is special?)

Thomas Lindgren thomasl_erlang@REDACTED
Fri Mar 7 19:33:33 CET 2008


--- David Mercer <dmercer@REDACTED> wrote:

> You know, I sent this in jest, but now that I think
> about it, it's not such
> a bad idea.  You can define a macro giving a better
> name for the module so
> you don't have to keep using the GUID.  Howzat?
>
>  
> 
> -define(stringlib,
> 'a613fd8b-647c-4b1a-9f4c-810f0b99993a')
> 
> . . .
> 
> ?stringlib:reverse(.)

For what it's worth, I tend to use ?mod:f(X) when I'm
trying out multiple implementations of some facility.
A poor man's parametrized modules, in way.

When I wrote a cross-module optimizer (EUC'01), I used
a variant of the above GUID technique for renaming
_records_, which got rid of a big practical problem:
record name clashes.

Adding the hash of the code to your beam file is
probably a good principle too.

So I'm basically with you :-)

Best,
Thomas



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 




More information about the erlang-questions mailing list