On Thu, 25 Feb 2010, Sven Schreiber wrote:
Allin Cottrell schrieb:
> mwrite(xy, "(a)dotdir/xy.mat")
OT: I know about the return value of mwrite(), but this "feels" more
like a command than a function. Or to put it differently: if I
understand correctly you recently introduced more sophisticated error
handling ($error and stuff). I wonder whether a mish-mash is being born
right now, sometimes getting error codes from function return values,
and sometimes from accessor variables?
I take your point that mwrite feels more like a command than a
function. One reason it was done as a function is so that it could
return an error code (rather than just bombing out on failure).
Now that we have "catch" (see the manual) that could be
reconsidered; but symmetry with mread (which is "naturally" a
function) would argue for function status for mwrite.
> colnames(h, "coherence")
another function used like a command -- how many are there?
In this case, admittedly, there's not much justification for
function status -- other than a feeling of mine (anyone else?)
that it's better to keep the command namespace of manageable size.
I'm always somewhat reluctant to add a new command, but don't feel
quite the same constraint with functions.
Allin