Skip to content
Prev 1341 / 63421 Next

problem with sub in graphs

Colin Farrow <C.Farrow@geology.gla.ac.uk> writes:
Wait a minute.

Am I the only one sensing that something is badly amiss with that
logic? I agree that that is the essence of the problem, but the
solution seems wrong.

The purpose of '...' is that a function does not be need to know
about certain parameters that are being handled by lower level
routines. It can just pass them along. 

This is very practical for modular programming in that you can just
(e.g.) add an option to a low level function without having to register
it with all other 'upstreams' functions (in different packages and
whatnot). Of course, you still have to be careful about the argument
names but that's fairly easy in practice.

Suppose that a function needs to call *two* such routines. Then why
should it suddenly be made responsible for keeping track of which
arguments make sense to which routine? I'd say that the only sensible
paradigm is that routines that get called with '...' should simply
disregard any arguments they do not understand what to do with.

(I'm also not very happy with the news that S-4 will be enforcing
identical calling sequences for generic methods, but that's another
matter)