Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utcs!mnetor!seismo!columbia!caip!princeton!allegra!ulysses!mhuxr!mhuxn!mhuxm!mhuxf!mhuxi!mhuhk!mhuxt!houxm!hropus!riccb!ihopa!ihnp4!inuxc!pur-ee!uiucdcs!uiucdcsb!wsmith From: wsmith@uiucdcsb.UUCP Newsgroups: net.lang Subject: Re: compound statements Message-ID: <8900039@uiucdcsb> Date: Thu, 10-Jul-86 17:28:00 EDT Article-I.D.: uiucdcsb.8900039 Posted: Thu Jul 10 17:28:00 1986 Date-Received: Sat, 12-Jul-86 06:18:10 EDT References: <5281@topaz.RUTGERS.EDU> Lines: 24 Nf-ID: #R:topaz.RUTGERS.EDU:5281:uiucdcsb:8900039:000:1031 Nf-From: uiucdcsb.CS.UIUC.EDU!wsmith Jul 10 16:28:00 1986 Another argument for forcing the brackets on a function: (derived from experience in programming in pascal...) You have your fancy, one statement function/procedure. it's three screenfuls and you just found out that the fancy 1 statement function now is a two statement function. Blech! Now you have to find the beginning of the procedure, the end of the procedure and add a begin/end pair at the ends. The related problem that exists currently is in pascal: Semicolons.... You have your one statement part of the `then' and then the obligatory semicolon since there is a following statement. Now the fancy if then ; becomes if then ; else ; (oops... where's that semicolon belong?) The general principle being violated here is that local changes to the program ought (at least in my book) only have local changes to the text of the code. needing to add the begin/end or play with semicolons are non- local and thus are annoying and a source of errors. Bill Smith ihnp4!uiucdcs!wsmith wsmith@b.cs.uiuc.edu