[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: |
Thu, 17 Sep 2015 03:21:16 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0 |
Follow-up Comment #10, bug #36743 (project octave):
Carnë,
_> What's the reason to place the extra syntax "automatic-broadcasting" in a
separate "bucket" than the others extra syntax?_
I wasn't aware that automatic broadcasting used a different syntax. I thought
that "automatic" meant that it uses the same syntax as non-broadcast
operations. If the syntax is different, please tell me the difference so I
can avoid it. You also refer to "doing input checking". As far as I can see,
that is impossible. The syntax "a+b" is used both for automatic broadcasting
and simple addition.
_> Why would you want an error?_
The reason I want an error, is so that I can fix the bug. If ever I write
a = [1 2];
b = [2;4];
c = a+b;
I always intend to get either [3 6] or [3;6]. The fact that I don't means I
made a mistake, and the interpreter should help me to find where that mistake
is. As it stands, it will fail the next time I assume that length(c)=2, at a
place far from where the real error is.
I would _love_ to have a syntax for broadcasting that is less cumbersome than
bsxfun (like prefixing the operator by a _), but _automatic_ broadcasting
(i.e., overloading existing syntax, which is what I believe is the case) is
something that we should have the option of being warned about.
_> If the reason is that you didn't saw warnings back in 3.8 [...]_
No, I _did_ see warnings back in 3.8, as I wanted.
In my own source tree, I have restored the "Octave:broadcast" warning so that
I can turn it on. Like all warnings, it is flagging an operation that is
likely to be unintentional. Users should be given as much flexibility as
possible in specifying what coding style is intentional and what isn't. By
all means have the warning off by default, but:
(a) the warning has a clear use. See for example bug #45761.
(b) it used to be available (not tied to a broken warning)
(c) the documentation at
[https://www.gnu.org/software/octave/doc/interpreter/Broadcasting.html] still
states that it is available
Why change what wasn't broken?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?36743>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #36743] Octave:matlab-incompatible warning warns about Octave's own files, Mike Miller, 2015/09/12
- [Octave-bug-tracker] [bug #36743] Octave:matlab-incompatible warning warns about Octave's own files, Lachlan Andrew, 2015/09/13
- [Octave-bug-tracker] [bug #36743] Octave:matlab-incompatible warning warns about Octave's own files, Lachlan Andrew, 2015/09/13
- [Octave-bug-tracker] [bug #36743] Octave:matlab-incompatible warning warns about Octave's own files, Carnë Draug, 2015/09/15
- [Octave-bug-tracker] [bug #36743] Octave:language-extension warning warns about Octave's own files, Mike Miller, 2015/09/15
- [Octave-bug-tracker] [bug #36743] Octave:language-extension warning warns about Octave's own files, Lachlan Andrew, 2015/09/15
- [Octave-bug-tracker] [bug #36743] Octave:language-extension warning warns about Octave's own files, Carnë Draug, 2015/09/16
- [Octave-bug-tracker] [bug #36743] Octave:language-extension warning warns about Octave's own files, John W. Eaton, 2015/09/16
- [Octave-bug-tracker] [bug #36743] Octave:language-extension warning warns about Octave's own files,
Lachlan Andrew <=
- [Octave-bug-tracker] [bug #36743] Octave:language-extension warning warns about Octave's own files, Carnë Draug, 2015/09/18
- [Octave-bug-tracker] [bug #36743] Octave:language-extension warning warns about Octave's own files, Lachlan Andrew, 2015/09/20