[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Coding Convections - Enabling a feature by loading a file
From: |
Peter S Galbraith |
Subject: |
Re: Coding Convections - Enabling a feature by loading a file |
Date: |
Sat, 07 Jun 2003 20:58:48 -0400 |
Lute Kamstra <Lute.Kamstra@cwi.nl> wrote:
> Peter S Galbraith <psg@debian.org> writes:
>
> [...]
>
> > But what is the rationale behind the loading of a package having no
> > visisble effect? If the only purpose of a package is to enable a
> > feature (say changing the cursor to a bar), why ask users to do:
> >
> > (require 'bar-cursor)
> > (bar-cursor-mode 1)
> >
> > instead of only:
> >
> > (require 'bar-cursor)
> >
> > ?
> >
> > I am perfect happy for packages to install themselves correctly once
> > loaded without having to go through more hoops.
>
> I'm not familiar with bar-cursor.el, but in general a library can
> implement more than one feature. In such a case, it is usually not
> obvious which feature to turn on. It is best to turn nothing on
> automatically and let the user choose which of the features to use by
> explicitly turning them on. Even if a library contains only one
> feature now, features might be added in future versions. Such changes
> won't surprise the user if nothing is turned on upon loading the
> library.
>
> Furthermore, some other library could (require 'bar-cursor) to use
> some function that is defined in bar-cursor.el. In such a case, you
> usually do not want bar-cursor-mode to be turned on.
>
> Lute.
Yeah, those are good reasons. You guys have convinced me that the added
steps are worth it in the long run.
Thanks for your comments,
Peter