octave-maintainers
[Top][All Lists]
Advanced

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

Re: About diagonal matrices


From: Jaroslav Hajek
Subject: Re: About diagonal matrices
Date: Sat, 21 Feb 2009 22:05:33 +0100

On Sat, Feb 21, 2009 at 9:08 PM, Søren Hauberg <address@hidden> wrote:
> lør, 21 02 2009 kl. 19:48 +0100, skrev Jaroslav Hajek:
>> Btw. if there is an agreement that this is necessary, then a
>> relatively quick and painless solution (that would not further delay
>> 3.2) is to make the special treatment of diagonal & permutation
>> matrices optional (that would probably involve just modifying a few
>> methods).
>
> I don't like the idea of having some variable that changes the behaviour
> of programs. Assume you provide me with a function that depends the
> value of this variable. Now, I have to incorporate this function in a
> program of mine that depends on the variable having the opposite value
> as yours. Then my combined code would have to look like this
>
>  special_diagonal_treatment (true);
>  some_function ();
>
>  special_diagonal_treatment (false);
>  some_other_function ();
>
> Now assume we have couple of variables like this one, and what you have
> is a collaboration (and debugging) nightmare.
>
> Søren
>
>

There are already such variables in Octave. Think about save_precision
or string_fill_char (OK, I dunno whether there are more). Sometimes it
seems the best solution. Usually it controls only corner cases (like
string_fill_char), so the risk of messing up is fairly low. The
important thing is the default; whoever sets such a global variable
should be aware of the possible risk.
Besides, I can hardly imagine a function depending on the
incompatibilities discussed.



-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

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