List Info

Thread: Argument Errors




Argument Errors
user name
2006-04-30 21:42:17

foo := method( a, b, *,
   a + b + [optional arg]
)

or

foo := method( a, b, ..,
 ;  a + b + [optional arg]
)

It requires no special syntax, and it looks similar to C's varargs.  It's kind
of nice to know whether the method takes optional args or not as a
self-documentation feature.

Mike

Jeremy Tregunna wrote:
> Oh please, grow up.
>
> On 30-Apr-06, at 2:44 PM, Lucas Carlson wrote:
>
>> To summarize what I am hearing from Jeremy, the argument seems to go:
>>       fuck the programmers who want to check arity and have better
>> debugging tools, let those wimps fend for themselves. read the
>> documentation and deal with it... Io has poor error messages but that
>> can't be solved... deal with it
>
> Not what I'm saying, but when language semantics are documented and
> people ignore it, they deserve what they get, PERIOD. I would have this
> same opinion regardless of current support.
>
>> Whereas Nick and I are saying:
>>       let's communally think of the best way to make arity checking
>> optional so that we can have the dynamic macros we love so much in Io
>> AND we can help people debug their Io apps more quickly by providing
>> them sensible errors at sensible times
>;
> If you want to provide this I'm not against it. I *AM* however against
> replacing the current behaviour with this behaviour because I've not
> seen one bit of convincing evidence that has yet to suggest to me it's
> not a misconception the programmer has made (read: hasn't thoroughly
> read the documentation to understand how Io handles arguments). That's
> not Io's problem, it's the programmers problem.
>
>> I think that both Nick and I wish there was a more productive
>> discussion, but it does not look like anyone seems to care to do
>> anything but stifle productive discussion in favor of keeping the
>> status quo and defending the current state of Io tooth and nail.
>;
> I'm not defending it tooth and nail, I'm merely asking for real world
> common examples demonstrating this problem that aren't due to programmer
> misconception; nobody can seem to provide this for me so how do you
> expect me to change my opinion?
>
>> -Lucas
>
>
> --
>
> Jeremy Tregunna
>
> jtregunnablurgle.ca <mailto:jtregunnablurgle.ca>
>
>
> "You cannot depend on your eyes, when your imagination is out of focus.&quot;
> -- Mark Twain

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )