[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #8983] automatic broadcasting for assignme
From: |
Lachlan Andrew |
Subject: |
[Octave-patch-tracker] [patch #8983] automatic broadcasting for assignment operations |
Date: |
Tue, 19 Apr 2016 11:03:25 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Follow-up Comment #11, patch #8983 (project octave):
Carnë, I don't mind too much which tracker you use. It was just a thought,
since IIRC you had previously mentioned that you sometimes file bug reports as
a reminder to yourself to do things when you get around to it.
Thanks for the background on "local". I knew that it existed, but hadn't
explored its specific semantics. Having something that is specific to the
scope of the caller is a great idea!
I've started implementing a "local_only" mode in which a warning only applies
to the current stack frame. My motivation is Octave:language-extension, and
that raises a big problem: the function is parsed in the stack frame of its
first caller. Code such as
function foo
warning ("on", "Octave:language-extension");
a = 1;
a++;
end
doesn't raise a warning, even without "local" or "local_only".
More importantly, even if "local_only" only applies to the current function,
then
function bar
warning ("on", "Octave:language-extension", "local_only");
ls
will raise warnings in the Octave function ls.
That is probably the best reason to separate Octave:automatic-broadcast back
out from Octave:language-extension -- the former should be active in the code
that is to be Matlab-compatible, and the latter should be active only in the
caller of that code. Perhaps the parse-time warnings should be triggered by a
"pragma" in the file being parsed rather than a warning status, and the latter
be used for execution-time warnings.
Anyway, that is a debate we can have once the local_only code is ready.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?8983>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/