octave-maintainers
[Top][All Lists]
Advanced

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

Re: Why does Octave ignore additional input arguments ?


From: Julien Bect
Subject: Re: Why does Octave ignore additional input arguments ?
Date: Tue, 09 Feb 2016 08:56:05 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.8.0

Le 09/02/2016 00:46, Nicholas Jankowski a écrit :

> I have to confess that I'm not really convinced by the reasons given to keep the current behaviour...
>
> But this has already been discussed, so let's leave things as they are.
>
> @++
> Julien

I think I remember the thought process being something like: what works in MATLAB produce the same output in Octave, but some things that work in Octave might not work in MATLAB, and that's ok when it is useful. And although it might be considered sloppy, some people have made use of that feature.


Accepting additional arguments silently seems to me like a dangerous feature for non-expert users, who will not be informed of potential syntax errors.

Unless of course every developper adds a check for nargin > nargin_max. This is what I do in the stk package, since I have to, but I find it annoying (and I would be perfectly happy with a default non-customized error message).

No other langage that I know of (R, Scilab, Python, Scilab, Julia) does that.

But as I said, this has already been discussed, and apparently no one is complaining, so I will keep adding checks for nargin > nargin_max everywhere.

@++
Julien



reply via email to

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