octave-maintainers
[Top][All Lists]
Advanced

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

Re: turning "Octave:broadcast" warning off by default


From: Jordi Gutiérrez Hermoso
Subject: Re: turning "Octave:broadcast" warning off by default
Date: Thu, 19 Feb 2015 16:42:08 -0500

On Thu, 2015-02-19 at 22:03 +0100, Philip Nienhuis wrote:
> Jordi Gutiérrez Hermoso wrote:
> > On Thu, 2015-02-19 at 19:57 +0100, Philip Nienhuis wrote:
> >> IIRC the warning is also there because Octave strives for Matlab
> >> compatibility. Automatic broadcasting isn't ML-compatible AFAIK.
> >
> > I always take "Matlab-compatible" to mean, "if it works in Matlab, it works 
> > in
> > Octave". I don't usually take it to mean "if it breaks in Matlab it
> > must also break in Octave".
> 
> If Matlab code gets run in Octave and then is subject to automatic 
> broadcasting, it may "work" (in the sense of "runs w/o error messages) 
> but there's no guarantee it'll yield the same (correct or not) results 
> as in Matlab. Right?

Only if the Matlab code was doing try-catches around an expected error
in dimensions. I considered this to be a sufficiently unusual
situation as to allow changing the behaviour.

But in general, all code that runs in Octave without error should also
run in Octave without error. Broadcasting in Octave doesn't change the
semantics of any non-erroneous Matlab code.

> > I get impatient when people want "Matlab-compatible" to mean
> > "exactly like Matlab, no worse, and certainly no better".
> 
> ? Hopefully you're not pointing at me here?

I wasn't thinking of anyone in particular. Certainly not you. It's
just a recurring pet peeve of mine, when Octave has to do something I
consider stupid, all in the name of Matlab compatibility.

> > I wish we could phrase it in a different way so it doesn't sound
> > like the user did something incorrect, but some sort of warning
> > should stay.
> 
> Yeah, "warning" is too heavy.
> 
> Maybe we should have something like "informative" messages.

This seems like a big change, a new class of messages. I was thinking
of just changing the warning to make it sound like broadcastin may
actually be something you want to do.

- Jordi G. H.





reply via email to

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