wick%instr.camosun.bcc.cdn%ubc.CSNET@RELAY.CS.NET.UUCP (02/10/87)
> Correct me if I am wrong but from my observations of Modula-2, I > think the reason why explicit exception handling mechanisms do not exist > is mainly because it was designed under the auspice of "Structured > Programming". This consists mechanisms such as iteration, sequence and > decision but also includes recommendations on functionality such as > "Single input, single output" Then why did he include multiple RETURN's for function procedures and why did he include multiple EXIT's from LOOP's????
CASHEN.SBDERX@XEROX.COM.UUCP (02/11/87)
REF: Then why did he include multiple RETURN's for function procedures and why did he include multiple EXIT's from LOOP's???? My (Exceptional) opinion is: Designing a programming language is in some respects a compromise on the ideal. According to my knowledge of "Structured Programming" (zero or otherwise?) one of the requirements or ideals is to provide fundamental function definitions. This I believe to mean that, if one uses something like a "Top Down" design methodology then the ultimate goal is to produce a Procedure or Function declaration which performs only one unique function. This Procedure or Function would have one entry point (Procedure Call) and one exit point (Return). In my coding experience (yes I do have some) I have defined single Procedures to perform more than one function and also introduced multiple exit points in the guise of expedience but in the strictest sense, that is not structured programming. I can only guess that such facilities are included in (structured?) languages like Modula-2 to enhance the armoury of the programmer. As to why exception handlers were not also included I can only presume it is because of flow control considerations (go from whence you came...) etc. Even so I can only offer my opinion and I don't want to be the one, to state what was in the mind of Ravel or Monet when they produced their greatest pieces. As a viewer I can only offer my impression. Short of asking the famed Mr.W. why he did or did not include Exception handlers I think we are stuck.... In the mean time, please refer all Exocets and IBM's to chiefly myself for future digestion. Mike.