[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Default arguments
From: |
Sean O'Rourke |
Subject: |
Re: Default arguments |
Date: |
Fri, 15 Dec 2006 08:36:52 -0800 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (darwin) |
My bad.
/s
-----------------------------------------------------------------
Please reply on the list so the discussion is kept archived and public
for others to comment.
Thanks,
jwe
On 15-Dec-2006, Sean O'Rourke wrote:
| "John W. Eaton" <address@hidden> writes:
| > One problem I have with keyword arguments is that if they are
| > allowed for any function argument, then you have to carefully
| > choose the names of all function parameters, and once you've
| > selected them, you can't change them without the potential for
| > breaking a lot of code.
|
| This is a significant constraint on library code (octave and
| octave-forge), but within your own code it seems manageable, and
| these kinds of interface decisions should be finalized before
| code is widely distributed. I haven't had much trouble either
| with Lisp or with the current "'key', value" approach in Octave.
|
| > There would also be problems with the way variable arguments
| > are overloaded in some Matlab functions.
|
| 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.
|
| /s
- Re: Default arguments, (continued)
- Re: Default arguments, Shai Ayal, 2006/12/15
- Re: Default arguments, John W. Eaton, 2006/12/15
- Re: Default arguments, Sean O'Rourke, 2006/12/15
- Re: Default arguments, Tom Holroyd (NIH/NIMH) [E], 2006/12/15
- Re: Default arguments, Sean O'Rourke, 2006/12/15
- Re: Default arguments, John W. Eaton, 2006/12/15
- Re: Default arguments,
Sean O'Rourke <=
- Re: Default arguments, Dmitri A. Sergatskov, 2006/12/15
- Re: Default arguments, John W. Eaton, 2006/12/15
- Re: Default arguments, Paul Kienzle, 2006/12/16
- Re: Default arguments, Tom Holroyd (NIH/NIMH) [E], 2006/12/15
Default arguments, John W. Eaton, 2006/12/14