On Fri, Jan 20, 2006 at 07:56:55PM +0100, Leopold Toetsch wrote:
> I'm currently rewriting the guts of argument passing which causes a few 
> tests to fail.
> 
> 1) Is the :opt_flag optional?
>    .param string description  :optional
>  # .param int    has_desc     :opt_flag    # <- is this always needed

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 <[EMAIL PROTECTED]>

Reply via email to