From octave-maintainers-request at bevo dot che dot wisc dot edu Fri Jul 11 22:22:47 2003 Subject: Re: more compatibility changes From: Paul Kienzle To: octave-maintainers mailing list Date: Fri, 11 Jul 2003 23:24:45 -0400 John W. Eaton wrote: >I'm also considering the following changes: > > * Remove the built-in variables initialize_global_variables and > default_global_variable_value and only implement the Matlab-like > thing of always initializing global variables to [], or make the > default values Matlab compatible. > Oops! Sometimes I'm not checking for this one. > * Remove the built-in variable default_eval_print_flag and only > implement Matlab-compatible behavior, or make the default value > Matlab compatible. > This just means putting ; after eval --- no big deal. > * Remove the built-in variable whitespace_in_literal_matrix and only > implement Matlab-compatible behavior, or make the default value > "traditional" for Matlab compatibility. > > I don't think that eliminating whitespace_in_literal_matrix would > cause trouble for code distributed with Octave since it should > already work with any setting of this variable. Also, we already > have a warn_separator_insert to allow warnings to be printed in > cases like [eye (n)], but it should probably be improved to only > warn about cases that are potenially troublesome (like the example > above) and not things like [1 2]. > Agreed. The warning is only when the function is first loaded, not every time it is run, right? >My current preference would be to remove these variables entirely >rather thanjust changing the default values so that we no longer have >to worry about trying to make code work for different settings. > There are way too many of these, so I'm all for removing those that you can. For backward compatibility purposes (I don't want to force users to upgrade Octave to use OctaveForge), I will have to assume that these things have the appropriate value and hope that people update their site startup file. Or I could replace code like dfi = do_fortran_indexing; with dfi = property('do_fortran_indexing') where property() is something like function v = property(name) if exist(name) v = eval('name'); else v = []; endif end Paul Kienzle pkienzle at users dot sf dot net