Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!tgr!cottrell@nbs-vms.ARPA From: cottrell@nbs-vms.ARPA (COTTRELL, JAMES) Newsgroups: net.lang.c Subject: This is not net.lang.algol Message-ID: <1895@brl-tgr.ARPA> Date: Thu, 3-Oct-85 18:36:49 EDT Article-I.D.: brl-tgr.1895 Posted: Thu Oct 3 18:36:49 1985 Date-Received: Sat, 5-Oct-85 07:29:22 EDT Sender: news@brl-tgr.ARPA Lines: 53 /* Ray Lubinsky writes: > Danwrites: > > Personally, I don't really like the {} braces of C, nor the "begin..end" > > of Pascal and its relatives. This is one thing that Ada has going for > > it with its "if..then..endif" style. > > > > I like to use these definitions: > > > > #define IF if( > > #define THEN ){ > > #define ELSE }else{ > > #define ENDIF } > > > > (Gee, I should write my own language) > > Yes, indeed. Or at least stop pretending that you're programming in C. I make > a lot of use of the compiler macro facility, but I've always thought that > screwing around with the appearance of the language like this is a real > abomination. Believe it if you need it, if you don't just pass it on. > Any body have a source license so that they can dig into the code of Bourne's > shell? No offense to Bourne (his shell is one of my most-used programming > environments), but the code is a mess of defs like DO .. OD, LOOP .. POOL,etc. > I fail to see the advantage unless one is incapable of learning a new language > and is forced to under-utilize C by thinking of it as something else. The thing about Bourne is that HE DID IT RIGHT!!! The standard, canonical, ordained by god way of expressing an IF statement is: IF condition THEN true-part [ ELSE false-part ] END Whether you want to call the END token FI or ENDIF I don't care. The one-statement model is brain-damaged and leads to mismatched else statements and/or begin/end or {} kluges. Even the C Preprocessor uses an explicit #endif. Bourne may have gone a *little* overboard (e.g. his `#define ANDF &&' & END will suffice for POOL, ESAC, & OD) his include file for the shell is a pretty close model for `handy.h'. > When I program in Pascal, I don't use a macro preprocessor so that I can make > the program look like C. If I had to program in TRASHCAL I would use *anything* to make it look like something else. > If I want to use C, then I use C. I don't program in C, I program in JC. I'm god in my own universe. After all, programming is just a game. Why not make up your own rules? It's all a dream we dreamed one afternoon long ago. jim cottrell@nbs */ ------