"Stephen J. Turnbull" <stephen(a)xemacs.org> writes:
>>>>> "David" == David Kastrup
<dak(a)gnu.org> writes:
David> If you bothered reading my reports instead of just crying
David> "it is David again, let us all bash him", then that would
David> be great, thank you.
I did read your report, and I considered your request unreasonably
demanding (see below). It is true I single you out, but I am not
bashing; I'm suggesting that to meet your needs we need a more radical
approach. Ben won't do it, I still might.
Do you have a problem with that?
David> What is so fscking hard about "can return a specifier or
David> nil" or "will either return a valid specifier or throw an
David> error"?
Nothing's hard about that, but that's not what you asked for; you
asked for what errors would it throw.
I asked about the return semantics. To quote:
Namely: what happens if the specifier refers to image files that
are not existent, that are broken, or that are in a format that
XEmacs does not support? Does make-glyph return nil? Does it
return a glyph that later triggers some error when being used?
Does make-glyph throw an error itself? At what point of time do
:file ... and similar properties actually get evaluated?
In short: what does make-glyph return or throw under what basic
error conditions?
Maybe this question was to broad. But the fact remains that the
make-glyph doc string does not mention what gets returned. It says
that the function creates a glyph, period. It does not even say that
this glyph is the return value of make-glyph. And it does not say
whether I can rely on the return value being a glyph.
In 160+ lines of (very appreciated) comment.
In contrast, a somewhat corresponding Emacs function (though much less
powerful) is documented as
create-image is a compiled Lisp function in `image'.
(create-image FILE-OR-DATA &optional TYPE DATA-P &rest PROPS)
Create an image.
FILE-OR-DATA is an image file name or image data.
Optional TYPE is a symbol describing the image type. If TYPE is omitted
or nil, try to determine the image type from its first few bytes
of image data. If that doesn't work, and FILE-OR-DATA is a file name,
use its file extension as image type.
Optional DATA-P non-nil means FILE-OR-DATA is a string containing image data.
Optional PROPS are additional image attributes to assign to the image,
like, e.g. `:mask MASK'.
Value is the image created, or nil if images of type TYPE are not supported.
That is all. Notice the last sentence? And no, I did not actively
dig through the functions from XEmacs and Emacs, noticed that here was
a single case where I could make fun of you and reported it in shere
spitefulness. And I did not check that there was an Emacs function I
could mention later that just happened to mention the return value.
Emacs Lisp does not have a "throws" keyword; to the best of
my
knowledge very few functions are documented as throwing errors at
all, let alone what errors they might throw even though almost all
can (except those delibertately designed to suppress errors).
Whatever. What does the function return, never mind the error cases?
In short, do I have a guarantee that whatever it returns (when not
throwing an error) can be used as a glyph specifier later on?
If you refuse to say what the function can return, then it is
impossible to guess when and where a program might fail or react
surprisingly.
Nothing. Both Ben and I in rather different ways treated your
report with complete respect. I'm sorry you don't see it that way.
Calling me "not an Einstein" for not figuring out that what make-glyph
will return should rather be gleened from the doc string of another
function mentioned in passing. Yup, in rather different ways.
I am still of the opinion that a function should document its return
value. In any form or extent you desire, but it should at least say
_anything_ about it.
And make-glyph does not. Not a single word. One can guess that it
will return the glyph that it creates. _If_ it creates one. And
you'll tell me it would not take an Einstein to guess that, I
suppose. But documentation strings are not supposed to be an IQ test.
In the time you took bashing me in this thread, you could have added a
single sentence about what make-glyph returns 20 times over.
Somebody asked in comp.emacs.xemacs recently whether XEmacs was dead
and he should switch over, and I told him thanks, we have enough
trolls of our own. But he does have a point. I won't cede it
publicly, since you are perfectly capable of shooting yourself in your
own foot and I should leave the business of killing XEmacs to you, but
he has a point.
The amusing thing is that for the average XEmacs developers, I am
pretty much synonymous with Stallman because of my ravings. Nobody
gets the small difference, namely that Stallman is mad at the XEmacs
developers for not killing it off, and I am mad at the XEmacs
developers for killing it off.
When the developers see their main task in explaining why XEmacs is
perfect instead of accepting even the most basic suggestions for
improvement, it is effectively dead. Since it stops catering for its
users unless they are developers, too.
The usual reaction on the Emacs list for a report of documentation
somebody did not understand is incredibly long-winded and partly
aggravating bickering _between_ half a dozen developers about just
what wording should be most clear.
And the usual reaction on the XEmacs list at least for me has been
rather uniformly incredibly long-winded and partly aggravating
bickering _from_ half a dozen developers about why there is no need to
change anything.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum