Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!inuxc!iuvax!bsu-cs!rb442!dhesi From: dhesi@rb442.UUCP Newsgroups: comp.unix.questions Subject: Re: Teaching Assembler on VAX (BSD 4.3) Message-ID: <104@rb442.UUCP> Date: Wed, 10-Jun-87 00:14:15 EDT Article-I.D.: rb442.104 Posted: Wed Jun 10 00:14:15 1987 Date-Received: Sat, 13-Jun-87 04:12:33 EDT References: <7447@brl-adm.ARPA> <1658@tekcrl.TEK.COM> <5874@brl-smoke.ARPA> <787@mcgill-vision.UUCP> Reply-To: iuvax!bsu-cs!dhesi (Rahul Dhesi) Organization: CS Dept., Ball State University, Muncie, Indiana Lines: 36 Summary: There is no rational justification for the existence of both m4 and /lib/cpp. In article <787@mcgill-vision.UUCP> mouse@mcgill-vision.UUCP (der Mouse) writes: >In article <5874@brl-smoke.ARPA>, gwyn@brl-smoke.ARPA (Doug Gwyn ) writes: >> Please don't use /lib/cpp except as part of /bin/cc. >> It is not intended for use as a general macro processor and may >> indeed go away some day. ... >> If you need a macro processor on UNIX, use m4. > >Except that m4 and cpp address things rather differently. Until you >write a macro package for m4 that makes it behave like cpp (and I mean >exactly like cpp), people will continue to use cpp. The simultaneous existence of /lib/cpp and m4, both of which do the same thing a little differently, has always perplexed me. The UNIX philosophy of different tools for different things makes sense. Here we have an aberration: Different things for the same purpose done a little differently. And though m4 is the more powerful package, it is also the one with the more convoluted syntax. I mean, really, look at this: define(compare,'ifelse($1, $2, yes, no)'). Most people would rather stick with the familiar #if..#else..#endif. Thus, although m4 is more than you need to teach assembly programming, it is also more than you deserve to have to cope with. I note with some interest that AT&T's new make utility includes a mechanism for decision-making using the syntax of /lib/cpp. One wonders (but not for very long) why m4 simply wasn't made a default macro processor for makefiles. I think /lib/cpp should be made an official part of UNIX and extended to cover the cases that only m4 can currently deal with. Then m4 should be gracefully moved to a resting place with a nice name like /usr/bin/obsolete until it fades away. -- Rahul Dhesi UUCP: {ihnp4,seismo}!{iuvax,pur-ee}!bsu-cs!dhesi