emacs-devel
[Top][All Lists]
Advanced

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

Re: files.el: Patch to make project-settings optional/customizable


From: Stephen J. Turnbull
Subject: Re: files.el: Patch to make project-settings optional/customizable
Date: Mon, 24 Nov 2008 11:14:24 +0900

Dan Nicolaescu writes:

 > Brittle is to allow the user to break something just by using a normal
 > way of changing settings "setq".  We have gone over this too many times
 > already... 

Agreed, making a defconst is not childproof (which seems to be the
goal of several senior developers these days).  But I thought Emacs
Lisp was a language used by adults?  You expect adults to read the
documentation and take responsibility for what they do.  I really
don't see a problem with using a defconst here.

BTW, "brittle" doesn't mean that it breaks when the user uses normal
features of Lisp to intentionally do something inadvisable.  "Brittle"
means it breaks *accidentally* in the normal process of programming.

Making this a defconst is the opposite of brittle: it is just good
programming practice, as it allows the byte compiler to check for
typos etc. and warn about attempts to set or bind the variable.  You
can't do that with a string.  (Well, you *could*, but then it would be
a symbol, wouldn't it?)





reply via email to

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