|
From: | Andrew Janke |
Subject: | [Octave-bug-tracker] [bug #56167] non-existent cell indexing 'C{}' should produce an error |
Date: | Tue, 23 Apr 2019 12:07:26 -0400 (EDT) |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36 |
Follow-up Comment #18, bug #56167 (project octave): > Since empty indexing '()' of regular objects is likely to indicate a coding problem, could we emit a warning when that is used? It could be a warning_with_id() so that the whole mechanism could be switched off easily if a programmer has used the construct extensively. Hmm. I dunno about that. If the purpose of supporting this indexing form is to allow programmers to use the "uniform access principle" and interchange function calls and array indexing, then it probably shouldn't generate a warning in one of those cases. And warnings can only be disabled globally, which is kind of course-grained. Maybe it could be a warning whose state defaults to off, allowing developers to enable it only when they want to do stricter debugging? _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?56167> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |