On Fri, 18 Jul 2008, Riccardo (Jack) Lucchetti wrote:
Sorry, I wasn't clear. My idea was to make "null" a
valid value
for pointers even when they're not optional.
Ah, I see.
I think the question is then whether this makes life easier or
more difficult for function writers. At first glance: isn't it
perhaps better for function writers to indicate when an argument
is optional, by adding a "[null]" default? Then they can rely
on gretl's function-call mechanism to weed out invalid calls, and
don't have to test for null-ness if a pointer argument is
in fact mandatory.
(In context we're talking about pointers that are used to
represent optional auxiliary info, but of course pointers can also
be used with mandatory arguments as a way of speeding things up by
avoiding the need to copy data).
Allin.