Re: Variable Arguments?
- Posted by CChris <christian.cuvier at agricultur?.gouv?fr> Apr 21, 2008
- 637 views
Jeremy Cowgar wrote: > > CChris wrote: > > > > The change was not trivial because it involves the ability to replay canned > > tokens after recording them. Indeed > > procedure foo(integer n=n0) > > needs late binding > > > > Even something as simple as: > > }}} <eucode> > procedure foo(opt object n) > </eucode> {{{ > > and if n was not supplied, n defaulting to NULL would be a huge step. > > }}} <eucode> > function round(sequence items, opt object n) > if n = NULL then n = 1 end if > ... code for round_precision ... > end function > </eucode> {{{ > > That's not as good as function round(sequence items, integer precision=1) but, > it's a huge step above what we have now and could be maintained later once an > assignment would be possible. > > How hard is something like that? > > -- > Jeremy Cowgar > <a href="http://jeremy.cowgar.com">http://jeremy.cowgar.com</a> What is NULL? If we had a nil object, as I have advocated for a long time, then it would be ok. But adding nil is trickier I think - or not, I haven't tried yet. Moving to 3-way logic might break too much code. CChris