tagmethod documentation

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

tagmethod documentation

Stephan Herrmann-2

this was reported by my students who got confused by
the way, some tagmethods -- specifically setglobal --
are documented:
They mistook the given function implementation as an
examplary tagmethod, not noticing, that there are
two different signatures involved: that of "setglobal"
and that of the tagmethod for "setglobal" (with and
without the middle argument 'oldvalue').

>From this they were puzzled by receiving only nil
where the were expecting the new value
(because they installed the tagmethod for tag(nil)).
Has this been brought up before? Couldn't find in the list.

Suggestion: add a few prose words (here and at all arithmetic
and the concat tagmethod, which add the name of the operation),
or print in bold letters on every page, that only the way of
_calling_ tm is relevant, not the signature of the enclosing
function. This wouldn't be so misleading, if ALL signatures were
noticably different, but for most tagmethods, one could in fact
think, that the functions in the manual were indeed tagmethods.
(kind of a master-tagmethod..)