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

Parnell Springmeyer ixmatus@REDACTED
Tue May 24 17:56:10 CEST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I really like the idea of packages - I'm not quite sure why everyone is
against them... Even Racket has extended the syntax of Scheme to the
point where they support packages and modules now; it's a very natural
abstraction for the human mind IMHO.

I would, personally, stop using (or fork) the language if I were forced
to program connected to a DB. If it were a local ets-like DB that
started when the Erlang VM started, cool. But not an over-the-internet
type of thing, this is a particularly bad idea too because some
applications really do need to be network efficient; if my language adds
overhead to my network because it needs to request the definition of a
function over the internet, that is A Bad Thing.

I don't like the idea loading everything when the VM starts. I much
prefer (and wish Erlang did it this way) the concept of calling an
import statement. I like being able to see what packages, modules, and
functions another module is referencing.

Additionally this solves the issue of pre-loading the entire namespace
when the VM starts; you only import when you /need/ it.

I am intrigued, however, by the idea of type signatures and finding
functions based on their metadata - cool idea.

In practice though, I would really hate maintaining the metadata for
every function I've wrote! I much rather group common functions into a
module and then annotate the module with metadata.

Anthony Ramine <nox@REDACTED> writes:

> Le 24 mai 2011 à 14:45, Joe Armstrong a écrit :
>
>> On Tue, May 24, 2011 at 1:56 PM, Max Lapshin <max.lapshin@REDACTED> wrote:
>> Very strange topic for me.
>> 
>> I'd like to know if there will be hierarchial modules in Erlang,
>> because tree of packages is a rather good idea:
>> 
>> No it's not - this has been the subject of long and heated discussion and is
>> why packages are NOT in Erlang - many people - myself included - dislike
>> the idea of hierarchical namespaces. The *dot* in the name has no semantics
>> it's just a separator. The name could equally well be encoders.mpg.erlyvideo
>> or mpg.applications.erlvideo.encoder - there is no logical way to organise the
>> package name and it does not scale - 
>
> packages are NOT in Erlang? Then the related code should be removed because
> erl.lang.number:plus(1, 1) definitely works.
>
> Also, I think the Haskell guys would disagree about packages not scaling.
>
> --
> Anthony Ramine
> Dev:Extend
> http://dev-extend.eu
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>

- -- 
Parnell "ixmatus" Springmeyer (http://ixmat.us)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org

iQEcBAEBAgAGBQJN29UaAAoJEPvtlbpI1POLpSAH/ijpOgfq1F+AF140/aXZke6C
EXrWaiFBOgna0lkKu4lmwusOebLbyoiPs9D9vstlVff7npZ4Zdw32fp9LRuBjwfY
rgGesMBoUGNMtpzXuuduCH7CkZNCIrBXj8uvKOBlDxt5csOz8FCpxvKDOXZg/z0I
bFMP0HTYj1pzC2ixk2RmlUdKdbMLCCriIU+n0R5f4lIEck1FcoDm233ZHv1Sv9QC
9PlQ4kF91H/CavPAdD/JX4sDp6NRTCjV/VWCUzDTOyK/11/fl4R7nAB61TXzkVmz
tv3y5z5RCkfjlatgvGSQ3d9vRbSn5fQneguxMX54JHI0WTEcWZ3xCQZZ8QKPuhY=
=Faf+
-----END PGP SIGNATURE-----



More information about the erlang-questions mailing list