[erlang-questions] Why do we need modules at all?
Tue May 24 20:14:29 CEST 2011
On Tue, May 24, 2011 at 5:56 PM, Parnell Springmeyer <>wrote:
> -----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.
Why? Who cares how the data is stored - the requirements on storage
would be never-loose-anything fast latency access form any machine
I'd imaging a fast local db, that synced with some cloud storage and
where you could work on-or off-line with periods of no net access.
If your machine were struck by lightening you should be ably to
resume on any other machine, possibly loosing a very small ammount of data.
I imagine a local copy of couchDB with off-site replicas would be ok for
> If it were a local ets-like DB that
> started when the Erlang VM started, cool.
Ets is too fast - we don't need to be ets fast :-)
> 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.
It's a trade off - if you always store modified functions in the net the
most you can loose is one function. If you don't you might loose
a lot of work if your machine suddenly disintegrates.
Umm let's think - in a good day I might write 500 lines of code
say 500 * 50 bytes in 86400 seconds that's 0.3 bits/second
I might look at ten times as much code - but I'd cache that locally.
> 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 <> writes:
> > Le 24 mai 2011 à 14:45, Joe Armstrong a écrit :
> >> On Tue, May 24, 2011 at 1:56 PM, Max Lapshin <>
> >> 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
> >> it's just a separator. The name could equally well be
> >> 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
> > 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
> > 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
> -----END PGP SIGNATURE-----
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions