On 10/29/07, hlovatt <[EMAIL PROTECTED]> wrote: > > Tennent's book is quite old and talks about Pascal, I don't recall any > specific discussion of exceptions and exceptions were not part of > standard Pascal. So my guess is that any form of non-local jumps would > not be covered by Tennent directly. The princiople says that the > meaning of the code should not change if enclosed in a block, e.g. > while loop, but it means any type of block and therefore also a try > catch block.
That is not Tennent's Correspondence Principle. So my reading is that any form of non-block structured jump is > excluded by the principle, i.e. no return, break, continue, or throw > statements. All these have to be simulated with a status variable. Your reasoning isn't valid (that Tennent applied his principles to analyze Pascal, and Pascal doesn't have multiple exit points, and therefore Tenent's principles don't support multiple exit points). Interestingly if an inner class was used instead of a block then a > control variable could be used and exceptions avoided all together: If assembly language were used instead of a high-level language, one could avoid blocks, inner classes, exceptions, and variables too! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---
