unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tadeus Prastowo <tadeus.prastowo@unitn.it>
To: Emanuel Berg <moasenwood@zoho.eu>
Cc: help-gnu-emacs@gnu.org, emacs-devel <emacs-devel@gnu.org>
Subject: Re: modularity, code for yourself and possibly others
Date: Tue, 2 Apr 2019 11:42:59 +0200	[thread overview]
Message-ID: <CAN-HRFb-mvBU_n1HqM2FMd3hwDoPSkKDTnuYuhVyRXiLAK1qyA@mail.gmail.com> (raw)
In-Reply-To: <86wokd9xi6.fsf@zoho.eu>

On Tue, Apr 2, 2019 at 12:48 AM Emanuel Berg <moasenwood@zoho.eu> wrote:
> Moving one function from edit.el to some other
> file would require the user to `require' that
> file instead, and that file would `require' yet
> another file(s), and so on. How would that be
> any different?
>
> In the extreme case, for someone else to use
> a single of my .el files, s/he would have to
> use my entire Elisp system!

Rather than going off tangent now by talking about the extreme case,
what about if we confine our discussion _for now_ to your specific
case of dealing with your pet function `delete-blank-lines'?

If you agree, then let's say we put that pet function to its own file
`whitespace-cleaners.el'.  As of now, that file will require no other
file.  So, its user will need to require only that file if that user
needs no other function of yours.  Problem solved here.

Now, let's enlarge the case a bit.  Suppose now the user also wants to
use one other function of yours in file `edit.el'.  If you had
engineered that function _and_ that file properly, then the user would
have no need to have your entire Elisp system.  Problem solved.

Jumping now to the general situation, a tradeoff exists between
reinventing the wheel and having a long chain of dependencies.  For
having zero dependency, reinvent all the wheels.  To minimize wheel
reinventions, add further dependencies.  As the engineer of your own
Elisp system, you should think about the right design; surely
different potential users of your Elisp system have their own
requirements regarding this tradeoff.

--
Best regards,
Tadeus



  reply	other threads:[~2019-04-02  9:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-29  0:42 modularity, code for yourself and possibly others Emanuel Berg
2019-03-29 10:43 ` Tadeus Prastowo
2019-04-01 22:22   ` Emanuel Berg
2019-04-02  9:42     ` Tadeus Prastowo [this message]
2019-04-04  3:20       ` Emanuel Berg
2019-04-04  8:10         ` Tadeus Prastowo
2019-04-04 22:38           ` Richard Stallman
2019-04-05  3:16             ` Emanuel Berg
2019-04-05 22:31               ` Richard Stallman
2019-04-05  9:57             ` Tadeus Prastowo
2019-04-05 22:33               ` Richard Stallman
2019-04-05 22:48                 ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAN-HRFb-mvBU_n1HqM2FMd3hwDoPSkKDTnuYuhVyRXiLAK1qyA@mail.gmail.com \
    --to=tadeus.prastowo@unitn.it \
    --cc=emacs-devel@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    --cc=moasenwood@zoho.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).