[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Opinions on Matlab compatibility, Octave development
From: |
CdeMills |
Subject: |
Re: Opinions on Matlab compatibility, Octave development |
Date: |
Fri, 4 Jun 2010 06:44:11 -0700 (PDT) |
forkandwait wrote:
>
>
> Exceptions I would like to see:
>
> 1. Named parameters a la Python like "z = f(x=3, y=[1 2 3])"
>
>
Hello,
I launched this kind of discussion months ago. The replies where : "try to
implement it". I looked into the parser code, but, quite frankly, I didn't
feel at ease modifying it.
I got this idea while looking at R code. Most functions have optional
arguments, with default values specified in the function definition, like
f.i.
function normal_cdf(x, mean = 0, std = 1)
This way, chaining functions is quite easy : resu = subfun(..., mean = 4,
...)
You don't have to care about arguments position whatsoever. Whatever way
subfun is defined, the argument "mean" will be initialised to '4'. A bit
more work for the compiler, a greater comfort for the programmer.
Regards
Pascal
--
View this message in context:
http://octave.1599824.n4.nabble.com/Opinions-on-Matlab-compatibility-Octave-development-tp2239611p2243250.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Re: Opinions on Matlab compatibility, Octave development, (continued)
- Re: Opinions on Matlab compatibility, Octave development, Judd Storrs, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development, John Swensen, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development, Jaroslav Hajek, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development, Emmanuel FARHI, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development, Judd Storrs, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development, bpabbott, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development, Søren Hauberg, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development, Judd Storrs, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development, Judd Storrs, 2010/06/02
Re: Opinions on Matlab compatibility, Octave development, fork, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development,
CdeMills <=
- Re: Opinions on Matlab compatibility, Octave development, Judd Storrs, 2010/06/04
- Re: Opinions on Matlab compatibility, Octave development, John W. Eaton, 2010/06/04
- Re: Opinions on Matlab compatibility, Octave development, Judd Storrs, 2010/06/04
- Re: Opinions on Matlab compatibility, Octave development, Jordi Gutiérrez Hermoso, 2010/06/04
Re: Opinions on Matlab compatibility, Octave development, Alois Schlögl, 2010/06/07