_argptr woes
Frits van Bommel
fvbommel at REMwOVExCAPSs.nl
Sat Mar 17 05:58:30 PDT 2007
Lars Ivar Igesund wrote:
> If there is an actual win in having _argptr as a pointer as opposed to the
> current behaviour, for instance the possibility to easily indexing into the
> argument list, then there is a good reason to have it in the specification.
>
> It is possible that other ways to have this working can be devised, but not
> being able to index into them portably, when they in any case need to be in
> the correct order, seems to me to be silly.
I agree that indexing is important to have, especially given how Tango's
format strings work.
However I don't think that justifies the language standard basically
requiring that va_list is a pointer, especially if it can't be portably
used without special standard library functions (i.e. va_arg and
friends) anyway.
If on a given architecture a pointer happens to be the most efficient or
natural implementation, fine. But I think that decision should be up to
the compiler, not the language.
More information about the Digitalmars-d
mailing list