octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #36743] Octave:language-extension warning warn


From: Lachlan Andrew
Subject: [Octave-bug-tracker] [bug #36743] Octave:language-extension warning warns about Octave's own files
Date: Mon, 21 Sep 2015 00:18:45 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36

Follow-up Comment #12, bug #36743 (project octave):

_> Sounds to me, like the only thing you want is to enable the automatic
broadcasting warning only. This is nothing to do with Matlab compatibility and
a small part of the original bug report. _

No, that is the side-discussion we have gone down.  The problem is that, while
working around the broadcast issue, I re-discovered this bug.  That means that
the bug is still alive, and still affecting people.


_> My point was why should we treat automatic broadcasting different from
everything else that we do different from Matlab._

The reason is the same as warning about  "if (a = b)".  It is valid code to
can easily result from an error.  The error is difficult to spot (in fact,
much harder to spot since the syntax is identical), and causes misleading
behaviour at a point distant from actual error.

Again, I'm not arguing that this should has to be enabled by default, but the
ability to flag this condition *was* there.  It costs no extra code to include
it.

Incidentally, the suggestion that *every* time I use a binary operator I check
the operands is entirely unworkable.  Consider an expression like
A = b + c * d.
It would have to become

  if ((isscalar (d) && any (size (b) != size (c)) ...
     || (isscalar (c) && any (size (b) != size (c)) ...
     || any (size (b) != [rows (c), columns (d)))
    A = b + c * d;
  else
    error ("Matlab would have told you what was wrong.  Try to guess.");
  endif


_> The warnings were during 3.6 and 3.8. That's a 2 years warning._

People are developing code today.  They are introducing bugs today.  They need
warnings today.

Just out of interest:  What fraction of Octave users do you think are using
Octave because of its differences from Matlab, and what fraction do you think
are using it because it is the most Matlab-compatible of the free work-alikes?
 I'd guess a ratio something like 1:20.  If you think it is vastly different,
I'd love to hear your evidence (other than a survey of the developers, of
course).

I'm sorry if I'm getting too fired up about this, but I want Octave to be
useful as a real development environment (i.e., developing application in
Octave, not developing Octave).  Bugs happen.  The interpreter should make it
easy for the user to fix them, by giving the user as much information as
possible.  I'm going through real hoops to improve this in bug #45957.  Why
are you so unwilling to consider fixing a one-line regression?


My own source tree is fine -- I've re-enabled the broadcast warning.  However,
I want to make Octave a better product, and am getting frustrated in my
attempts.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?36743>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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