Steve Fink <[EMAIL PROTECTED]> wrote: > On Sep-28, Leopold Toetsch wrote:
>> So we should specify, what to do with wrong param counts or wrong >> types. pcc.t has some examples for this (labeled "unproto" or >> "exception"). > I was arguing that this isn't enough. We need the set of parameters to > really be different in the two cases, so we need two sets of ".param" > statements, not just one. I don't think, that we need 2 different sets of ".param" blocks. But missing is a notion for optional params and possible default values of these. What about uninitalized optional params? > Yes, this is what I was talking about in the big block comment in the > sample code at the end of my last message. Perl6 does have them. I > don't know whether Perl6 or any other language we want to be nice to > has *non-constant* defaults. If so, and if we want direct support for > them, then it means we need to evaluate them in the context of the > callee. Yep. This would need some extend .begin_param declaration probably, where the code for evaluating the initializer could go in. > There's the issue of detecting whether a parameter was passed or not, > in order to decide whether to fill in the default value. (See my last > message for more discussion of this.) The caller does pass in the argument count. leo