On Sat, 26 Jul 2008, Allin Cottrell wrote:
As for string arguments, the lack of a facility for setting a null
default was an oversight, now fixed in CVS/snapshot. The syntax
is now the same as for lists, e.g.,
Nice. How would you like to generalise this mechanism, giving every type
we have a default value? We already have null for a few cases (pointers,
lists and now strings): NA comes to mind for scalars and {} for matrices.
For series, I wouldn't know (maybe a string of NAs? const? 0?). This
way, every parameter becomes optional.
> That is really my point about the convenience of using
> $accessors rather than pointer arguments.
I'm not very happy with the idea of $ accessors for objects
created during a function call. When a function exits, one wants
to clean up, freeing all the temporary resources it has used. I
wouldn't like to have functions "leaving a bunch of junk around"
after they exit.
I agree.
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti