octave-maintainers
[Top][All Lists]
Advanced

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

Re: Idea: Extension of function / return syntax.


From: Júlio Hoffimann
Subject: Re: Idea: Extension of function / return syntax.
Date: Mon, 7 Jan 2013 07:40:08 -0300


I think the benefits are comparable to other small things that Octave
has already added, like C-style operators, using double quotes for
strings, and so on. All the changes that I am aware of that Octave has
added are things that I would consider small, but I am glad that they
are there. These differences are the only reason I do not dismiss
Octave as just a Matlab clone. 

Hi Daniel,

Sorry if sounded rude, what i tried to say was that the actual syntax is much simpler. Why to bother in return explicitly if Octave is able to track any touch in the return list? Again, the return statement exists to merely avoid unnecessary computations.

About the last proposal - the Perl-like return statement - other languages such as Julia adopted it (http://docs.julialang.org/en/latest/manual/functions/). I don't think it's a good design for the reasons i just explained. Moreover, complexity is to be avoided, having multiple ways to declare a function doesn't help the parser.

As always, that's just my point of view, let's the giants decide if it's a great feature to have.

Cheers,
Júlio.

reply via email to

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