Skip to content
Prev 169123 / 398506 Next

sub question

Peter Dalgaard wrote:
i was half-joking, and none of the below descends on a name.
yes.  'o' is certainly a free variable here, and not one in the operator
position.  which stilld does not mean that it cannot name a function,
but that's a different story, the issue is syntactical here.

the third form above is more complicated in implementation, but not in
use.  the interface is just the same.  sometimes it's better to
complicate the implementation to make the interface better (here:
performing an operation in accordance with the syntax of the language).
you surely know the answer.  virtually any feature in r i pointed out as
weird is claimed to be intentional, and thus there is a legitimate
reason (if only the intention itself) for it.  that's why i cannot be
sure this one is not intentional.  that's why it's possible that the
behaviour of gsubfn discussed before is a user bug (user = implementor
of gsubfn).

and of course i can't be sure that there isn't code in some package that
relies on the current behaviour of all.vars.  but if, as you said, this
is not what the documentation says, it should be no obstacle.  gsubfn,
for example, was caught by surprise, and does not seem to demand the
current state of the matters.

is this a design feature?  i guess not, and if it is an implementational
incident, it's not something that should necessarily persist.  perhaps
it's a good idea to do some design thinking first, and then reimplement
the stuff as designed (and documented).  perhaps as yet another all.*
function, or via an additional argument to all.vars.

vQ