help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How many packages do you use?


From: Arsen Arsenović
Subject: Re: How many packages do you use?
Date: Sun, 25 Feb 2024 14:57:56 +0100

Hi,

Emanuel Berg <incal@dataswamp.org> writes:

> Arsen Arsenović wrote:
>
>>>   $ grep -h -o '(require .*)' **/*.el | sort -u | wc -l
>>>
>>> I use 159!
>>
>>   ~$ qlist -I app-emacs/ | wc -l
>>   63
>>
>> ... and a few more through USE=emacs.
>
> ?
>
> What commands and directory are those?

'qlist' is a Gentoo tool for listing installed packages and their files.
Gentoo packages many Emacs packages as 'app-emacs/${name}' (Gentoo
packages are namespaced by category, in this instance 'app-emacs').
'USE=emacs' enables Emacs support in a few other packages, which enables
some more packages (e.g. dev-build/autoconf installs the autoconf mode).
I have 24 packages with USE=emacs, so that's about 80-some total
($(($(qlist -I app-emacs/ | wc -l) + $(quse -I emacs | wc -l))) = 87)

>>> Isn't it amazing that one almost never has any collisions
>>> doing it? Actually, I can't think of a single time that
>>> happened. But maybe it happened once or twice as I don't
>>> remember everything that happens.
>>
>> Depending on what you mean by collisions, I might or might
>> not have had some.
>
> If you bring in a bunch of stuff onto a global namespace, you
> get a collision if two things are called the same.

Ah, I see.  Thankfully, I don't think I've seen that either, which, now
that you mention it, is rather impressive!

>>> Maybe this shows that built-in and/or enforced modularity
>>> is over-rated?
>>
>> I'm not sure I can agree even if that were true - I don't
>> see how one implies the other.
>
> One way of doing it is to have everything refered to by a full
> path or other composition notation involving the module name,
> so some function 'sin' from the package 'math' would be called
> by 'math:sin' or using some similar syntax to that end. And if
> there are two packages called 'math' one would etc etc.
>
> But any such schemes seems to be unnecessary, at least here.

It'd help with some issues I think, for instance, it'd make it easier to
tell when a (require) is needed or such.  Emacs already has modularity,
but out of necessity rather than as a development tool, it seems to me.

The Haskell import system by default does unqualified imports (i.e. no
prefixes), but can make them qualified with an arbitrary prefix.  For
Python, the default is inverse but the rest holds.  I think both of
these are nice compromises and make for quite useful and usable
modularity.

Have a lovely day!
-- 
Arsen Arsenović

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]