[erlang-questions] Package Support/Use

Sean Hinde sean.hinde@REDACTED
Wed Nov 1 19:43:46 CET 2006


On 1 Nov 2006, at 17:50, Dominic Williams wrote:

Lots of good stuff..

>
> 1) it only reduces the likelyhood of a name clash, and if
>    one occurs nevertheless you are back to square one;

Absolutely. I would even go as far as to argue that it is a hidden  
benefit for community projects to have a single flat namespace. The  
Erlang world does not need 3 projects with the module name  
'http_client', or 2 projects with the module 'ssh_cm'.

If a name clash helps to consolidate even 1 such project into a  
single stronger code base then it has been a benefit.

>
> In any case, the name clash avoidance situation comes and
> spoils this otherwise legitimate use of packages, because:
>
> 1) to further reduce the chance of clash, no one resists the
>    temptation of introducing additional levels (company
>    name, product, ...) which have NO value in terms of
>    describing the design and NEGATIVE value in terms of
>    making the code clearer.
>
> 2) because packages encourage you to think about this kind
>    of structure too soon, the package organisation is
>    usually too complex and often does not even map to the
>    code dependencies.

Great points. Totally agree. It is hard enough to get into an  
existing large project without heavily misleading historical  
organisational cruft.

>
> Ideally, I would like Erlang to have no files at all, like
> Smalltalk. In a sense, any kind of mapping seems contrary to
> this ideal. On the other hand, I suppose writing tools that
> hide the filesystem is easier if the tools can make strong
> assumptions about the organisation of files.

Here I disagree. I very much like the simple mapping of 1 module == 1  
file with the same name.  Every layer of indirection is another thing  
to distract from the difficult enough business of writing clean  
elegant and correct code.

>
> Even if a renaming mechanism is too difficult to implement,
> I don't think packages system in its current form is
> satisfactory and I vote for it not to be officially adopted.

One more Vote from me. Great post!

Sean






More information about the erlang-questions mailing list