[erlang-questions] Re: Library management in erlang.

Nicholas Frechette zeno490@REDACTED
Tue May 18 19:56:32 CEST 2010


This is going to get quite painful, quite quickly.
Whenever you'll be the first programmer to use two packages together that
nobody used together before and a module, or registered process name clashes
with one or the other (or with your code), you'll be left with a question of
which to fix? Both (all three)?
Won't this lead to packages not already prepending a prefix to everything to
release a number of patches to 'fix' compatibility issues with other
packages?

The package system will not be able to fix/catch all. Yes it'll be able to
warn you: don't do this, it conflicts but you'll be stuck fixing things
yourself. In reality, there should be an encapsulation primitive in the
language (like namespaces, for modules and registered processes and other
global ressources).

Without a language primitive, we'll be left with tight naming guidelines one
has to follow to publish a package. IMO, an unnecessary hurdle. In fact, I'm
sure that at ericsson, internally they must have strict naming guidelines in
place to prevent clashes in case an app would be shared. While this might
work at a company scale, it won't at a scale comparable to ruby gems.

A feature like that is quite important to help code sharing and an erlang
library sharing app would be a great justification to implement it.

On Tue, May 18, 2010 at 1:08 PM, Dale Harvey <dale@REDACTED> wrote:

>
>
> On 18 May 2010 18:01, Bob Ippolito <bob@REDACTED> wrote:
>
>> On Tue, May 18, 2010 at 8:36 AM, Nicholas Frechette <zeno490@REDACTED>
>> wrote:
>> > IMO, it is premature to talk about an erlang library management system
>> when
>> > the risk of module name collision is so high. We'd have to
>> require/enforce a
>> > package prefix in the form of 'packagename_' to all modules of a
>> package.
>>
>> Many (most?) packages already do this, so it's not really a problem.
>>
>> > That is until erlang has an approved package/namespace system (the one
>> > currently implemented is experimental and discussed in another thread
>> atm).
>>
>> There's plenty other global resources you can run into that aren't
>> just module names, e.g. processes or applications. Picking a namespace
>> syntax doesn't fix that.
>>
>>
> and the erlang "application" infrastructure already warns(errors?) against
> conflicts in module names / global processes etc.
>
> As long as the library management system was based around .app files,
> doesnt seem like there would be a problem
>
>
>> Also if you don't install packages system-wide, you're even less
>> likely to have a problem. You could use something like Basho's rebar
>> to manage application installs with dependencies.
>>
>> -bob
>>
>> ________________________________________________________________
>> erlang-questions (at) erlang.org mailing list.
>> See http://www.erlang.org/faq.html
>> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>>
>>
>


More information about the erlang-questions mailing list