octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Default arguments


From: John W. Eaton
Subject: Re: Default arguments
Date: Fri, 15 Dec 2006 12:39:39 -0500

On 15-Dec-2006, Sean O'Rourke wrote:

| I would propose that only arguments with default values can be
| passed using keywords, since non-optional keyword arguments are
| just strange.  That way there's no impact on existing functions.

OK, this makes sense.  I don't know why I was thinking that it would
be meaningful to have keyword arguments without default values, since
keyword arguments are of course intended to be optional.  In any case,
I do agree that the maximum mixture of varargin, default values, and
keyword arguments could make a real mess.  But these features are
already used in some way or another.  So I don't see that we are
adding complexity here.  Really, we are just making it more manageable
because you currently have to do extra work to handle default values
and keyword arguments.  Whatever.  If you want to take a shot at
implmenting keyword arguments, please do so.  I'd consider a patch.
Please use ':=' as the new operator for the function call.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]