Re: PL/SQL Interpreter oddity - bug or "expected"?

  • From: Stefan Knecht <knecht.stefan@xxxxxxxxx>
  • To: "Mark W. Farnham" <mwf@xxxxxxxx>
  • Date: Tue, 20 Mar 2018 10:47:09 +0700

Thanks guys!

And Mark, I'll definitely be putting a case on for that ER.

Just a few days ago I did the same thing with another ER:  5865777 :
CONNECT-TIMEOUT FOR UTL_SMTP AND OTHER PL/SQL NETWORK UTILITY PACKAGES
which just happens to have been created way back in 2007 as well :)

Stefan





On Tue, Mar 20, 2018 at 3:57 AM, Mark W. Farnham <mwf@xxxxxxxx> wrote:

Stefan, please file the business case that allowing unmatched block labels
are error prone for human readers.



Then, regardless of whether it is handled as and “enhancement request” or
as a “deficiency removal” it will have a chance for action.



I would offer the slight enhancement to the enhancement that this be
handled as a warning by default, lest we cause apparently correctly (or at
least unnoticed) running code that has textual deficiencies to continue as
they are.



I **suspect** the modern culture of unit testing by getting through the
compiler has created a sufficient mass of such code to justify being wary
in unleashing the enhancement.



Thanks Bryn. Thanks Toon.



mwf



*From:* oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@
freelists.org] *On Behalf Of *Michael D O'Shea/Woodward Informatics Ltd
*Sent:* Monday, March 19, 2018 4:55 AM
*To:* knecht.stefan@xxxxxxxxx
*Cc:* Toon Koppelaars; oracle-l-freelists
*Subject:* Aw: PL/SQL Interpreter oddity - bug or "expected"?





Am 19.03.2018 um 07:57 schrieb Stefan Knecht <knecht.stefan@xxxxxxxxx>:



So to summarize, I still feel that the behavior isn't what

I'd expect. Regardless of what "loop" is underneath the covers,

it has a special meaning, and that meaning is entirely obliterated

by the compiler treating it as a mere label.



The take home message from this whole thread is not null block usage or
how contributors used terms such as label, keyword, reserved word, or other
semantic terms, but that PL/SQL language grammar & syntax allow for the
confusion demonstrated in the OP’s code. This is a *deficiency* and we
should not get carried away with semantic terms.



Here, as also included in this thread  https://blogs.oracle.com/
plsql-and-ebr/reserved-words%2c-keywords%2c-and-the-ends-of-labeled-blocks
<https://blogs.oracle.com/plsql-and-ebr/reserved-words,-keywords,-and-the-ends-of-labeled-blocks>
 Bryn
Llewellyn writes



Please check out this *enhancement request*. I filed it on 31-Mar-2008.



ER 6931048 - Implement new warning when block label doesn't match “end
... ;”





If one were pedantic, one would argue this is not an „*enhancement
request*“ (as written) but a „*deficiency removal*“. You see, arguing
over semantic terms gets us nowhere. The bottom line is that PL/SQL
language syntax and grammar allows for this coding man-trap and as such it
is currently broken. Furthermore, according to Bryn’s „enhancement
request“, it has been broken for at least a decade, so obviously not broken
enough to warrant being fixed.



My twopence.



Mike

http://www.strychnine.co.uk










-- 
//
zztat - The Next-Gen Oracle Performance Monitoring and Reaction Framework!
Visit us at zztat.net | Support our Indiegogo campaign at igg.me/at/zztat |
@zztat_oracle

Other related posts: