emacs-devel
[Top][All Lists]
Advanced

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

Re: use-package.el -> Emacs core


From: Oleh Krehel
Subject: Re: use-package.el -> Emacs core
Date: Tue, 10 Nov 2015 15:15:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

David Kastrup <address@hidden> writes:

> `setq' is syntactic sugar for `set' and `quote'.  `define-key' and
> `add-hook' are syntactic sugar for various forms of `set'.

`setq' is a simple and reusable abstraction (this one in particular has
survived the test of time, having been used and abused for decades), so
are `define-key' and `add-hook'.

> The whole point of not using primitives is not having to provide every
> part of some pattern by hand.

My point is that it's harmful to aggregate every single thing into one
construct, e.g:

    (use-package foo
        :setq (bar 1 baz 2 boo 3))

instead of

    (require 'foo)
    (setq bar 1)
    (setq baz 2)
    (setq boo 3)

It's like multiple inheritance vs. composition in C++: composition is
usually more clear.



reply via email to

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