[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ideas for auto BSX
From: |
John W. Eaton |
Subject: |
Re: Ideas for auto BSX |
Date: |
Fri, 30 Sep 2011 15:31:22 -0400 |
On 30-Sep-2011, Jordi Gutiérrez Hermoso wrote:
| I guess I could enable a global option to disable auto BSX if you
| prefer to error out if you get the orientation of vectors wrong. It
| shouldn't impact performance greatly.
We really don't want to do that. Ancient versions of Octave had many
such global options. They caused a lot of trouble and we had to do a
lot of work to remove them.
Although they may be tempting to use, global options for behavior
cause trouble because then you have to start writing code that looks
like this
unwind_protect
saved_do_auto_bsx = do_auto_bsx (true);
## write some code that relies on the global option do_auto_bsx
## being true; hoping that any code below which relies on it being
## different uses a similar method to protect itself...
...
unwind_protect_cleanup
do_auto_bsx (saved_do_auto_bsx);
end_unwind_protect
or someone who tries to use it later with a different choice for the
global setting will not get the same results as you (possibly silently
wrong).
jwe