octave-maintainers
[Top][All Lists]
Advanced

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

Re: warnin about 'info' is a bug in eigs-base.cc


From: Jordi Gutiérrez Hermoso
Subject: Re: warnin about 'info' is a bug in eigs-base.cc
Date: Thu, 30 Aug 2012 09:43:06 -0400

On 29 August 2012 18:47, Daniel J Sebald <address@hidden> wrote:
> First, I assume the following inclusion in eigs.c is intended:
>
> #include "eigs-base.cc"
>
> as I don't see an associated "eigs-base.h" header file.  But it is somewhat
> unconventional to include C++ code via the header route.

Yes, there is nothing wrong with #including .cc files. This is quite
common when they contain template definitions, as is the case here.

On 29 August 2012 19:26, John W. Eaton <address@hidden> wrote:
> It looks like Jordi made the change to abuse info by overloading it to
> also pass nargout:
>
>   http://hg.savannah.gnu.org/hgweb/octave/rev/82d51d6e470c
>
> Jordi, would you like to explain?  I think it would be better to find
> another way to fix this problem.

Well, the "right" way would be to change the API all over the place to
pass an extra argument. I started doing that, and it turned into such
a horrible mess that I decided to use info instead, since its input
didn't seem to be used for anything.

The sparse code is quite tangled, not to mention copy-pasted, so
whatever change you make, you have to copy across all of the other
copy-pasted parts. I got fed up and opted instead for the change that
required the least number of lines of code to change.

I guessssss that I shooooouuld instead refactor and untangle the
sparse code. Do you insist I do that? It seems like a stupid
refactoring effort, but I guess we'll have to do it sooner or later.

- Jordi G. H.


reply via email to

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