[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5105: 23.1; doc string of facemenu-set-face
From: |
Stefan Monnier |
Subject: |
bug#5105: 23.1; doc string of facemenu-set-face |
Date: |
Mon, 01 Aug 2011 17:27:51 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>> > What? Why are you arbitrarily deciding that? Why not assume that
>> > allowing a string is a good thing, a purposeful design decision?
>> Because a good programmer knows that it's obviously not a good idea to
>> encourage the caller to use a string here.
> It might be obvious to what you call good programmers, but how about giving a
> _reason_, for us mere mortals?
How 'bout the other way around: give me a reason to accept strings.
>>> We have many places in Emacs where we allow an arg to be
>>> either a thing or its name. Think of all of the BUFFER args
>>> that can be a buffer or a buffer name.
> What do the "good programmers" say about the design in those cases? Is it
> "obviously not a good idea" also?
Very often, yes it's also a bad idea. At least for buffers we have
a guarantee that there is a one-to-one mapping between (live) buffers
and buffer names, so for buffers it's a bit less bad.
Stefan
- bug#5105: 23.1; doc string of facemenu-set-face,
Stefan Monnier <=