[Scilab-Dev] [oldEmptyBehaviour()] displaying a warning message in both Scilab 5 and Scilab 6 behavior

Clément David clement.david at scilab-enterprises.com
Wed Apr 20 19:31:01 CEST 2016


Hello all,

Le vendredi 08 avril 2016 à 12:09 +0200, Clément David a écrit :
> Hello,
> 
> (I may not have formulated the current status and my proposal clearly enough)
> 
> > 
> > > 
> > > However, the current implementation display a warning in both Scilab 5 enforced and Scilab 6
> > > execution mode. I proposed a patchset [1] to remove the warning in the Scilab 6 execution mode
> > > but
> > > preserve it on the Scilab 5 mode (eg. after a call to oldEmptyBehaviour("on") ).
> > 
> > I am afraid that i do not catch all what you mean.
> > With "Scilab 5 enforced execution mode", do you mean in  Scilab 6 with oldEmptyBehaviour("on")
> > mode?
> > So, instead of using this mode to still ACCEPT and NOT warn users whether []+a is met, it would
> > warn users,
> > while in oldEmptyBehaviour("off"), meeting []+a would no longer warn users?
> > 
> > BTW:
> > * The discussion with Eric and other users is not a flame-war. The more i modified my code about
> > this feature, 
> >    the more i thought that even if "[]+a == a" is not "logical", it is very handy, it does not
> > hurt, and it prevents nothing. 
> >    Removing it compels to add as many if/then/else.  And what for?
> Currently, to remove the warning we have to explicitly write if/then/else code. There is a warning
> in add and subtract codes on the *normal execution mode* (whatever it is). In my view, this is
> useful to ease porting but a stable Scilab release should not contain a warning in normal
> execution
> mode.
> 
> In the source code, a warning is present on :
> 
> 1. 1+[]
> 2. 1+[] if oldEmptyBehaviour has been set
> 
> I want to remove the 1. warning but this might break without warning existing code non-ported
> code.
> It currently breaks with a warning.

Just to keep you informed : at the team meeting we decided to keep the warning for the 6.0.0 release
to ease porting. We will remove it on a future release soon or later depending on the feedbacks.

Thanks for all your inputs, it helped us when perform the warning removal.

--
Clément




More information about the dev mailing list