1) Is the :opt_flag optional?
.param string description :optional
# .param int has_desc :opt_flag # <- is this always needed
(this is from Test/More.pir)
2) Param count mismatches
lua/t/function.t:
local function g(a, b, ...)
# .param pmc var_a ; .param pmc var_b ; .param pmc argv :slurpy
...
g(3)
With param count checks turned on this would clearly fail. But what
without these checks? Are these checks mandatory, as pdd03 implies, or
do we keep a less strict mode, which would pass NULLs and create the
slurpy argv for this case?
Thanks for clarification,
leo
Yes, :opt_flag is optional, no, it is not always needed. (I get to be
unambiguous, disagreeable, and helpful at the same time. :-))
> 2) Param count mismatches
>
> lua/t/function.t:
>
> local function g(a, b, ...)
> # .param pmc var_a ; .param pmc var_b ; .param pmc argv :slurpy
> ...
> g(3)
>
> With param count checks turned on this would clearly fail. But what
> without these checks? Are these checks mandatory, as pdd03 implies ...
Checks are mandatory in supported Parrot. (Unsupported hacks, e.g.
for debugging, can do anything, up to and including spawning nethack.)
If the callee wanted to be flexible he would have to use :optional, and
I can imagine that e.g. Perl 5 translations would always have to use it.
> Thanks for clarification,
Glad to help
--
Chip Salzenberg <ch...@pobox.com>
> Checks are mandatory in supported Parrot. (Unsupported hacks, e.g.
> for debugging, can do anything, up to and including spawning nethack.)
That will need a configure.pl check though, because Perl 5 isn't yet probing
for the path of rogue-like games yet.
(For context on the joke Chip is alluding to see
http://www.nntp.perl.org/group/perl.perl5.porters/92477 )
Nicholas Clark