octave-maintainers
[Top][All Lists]
Advanced

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

Re: Excellent changeset


From: Max Brister
Subject: Re: Excellent changeset
Date: Wed, 11 Apr 2012 09:13:35 -0600

> Max,
>
> Nice work on nested functions
> (http://hg.savannah.gnu.org/hgweb/octave/rev/be18c9e359bf)!

Glad you like the patch.

> I benchmarked Octave before and after and didn't detect any slowdown.  I
> also put the nested function through some tests and it passed them all
> (Well, function handles to nested functions generated an error, but at
> least the error message was that this feature was not yet available).
>
> I expanded a bit on your terse NEWS update since I think this is a bigger
> deal that coders should know about
> (http://hg.savannah.gnu.org/hgweb/octave/rev/b8edefd8c111).

Thanks, I had forgotten about the NEWS file and jwe added the original line.

> I'm also going to file two issues on the bug tracker so that they don't get
> lost: 1) We need a new subchapter in the func.txi that describes nested
> functions, what they are, how to create them, where they are best used,
> etc.

I can go ahead an try to write this subchapter. I will recommend that
subfunctions be used over nested functions, as nested functions can be
more difficult to debug. However, once closures are implemented I
think nested functions become a little more useful.

> and 2) We need to add stress tests for nested functions in either
> test_func.m in the test/ directory or create a brand new m-file just for
> testing nested functions in Octave.

The test/nest folder contains several tests for nested functions. I
ran into problems declaring nested functions in test blocks, so I
created a subfolder to contain all of the .m files for the nested
function tests.

Max Brister


reply via email to

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