Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!pasteur!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!portal!cup.portal.com!doug-merritt From: doug-merritt@cup.portal.com Newsgroups: comp.sys.amiga Subject: Re: Draco keywords Message-ID: <6762@cup.portal.com> Date: 22 Jun 88 14:54:07 GMT References: <1809@van-bc.UUCP> <25958@bbn.COM> Organization: The Portal System (TM) Lines: 56 XPortal-User-Id: 1.1001.4407 Bernie Cosell writes: >People with this prejudice (which I happen not to share) get around it >by using the preprocessor. You can do something like > #define THEN { > #define ELSE } else { > #define FI } Please don't! This is NOT just a matter of taste. Doing this will break any and all software tools that could otherwise help you out with various programming tasks. For instance, doing the above breaks CTAGS. It would also break syntax-directed editors, etc. Furthermore, even aside from practical reasons ("but I don't have any software tools like that so who cares?"), there's a philosophical problem with it, too. You're trying to redefine the language. Ever hear the expression, "if it ain't broke, don't fix it"? Well, C is *not* broken! Sure, some people prefer ALGOL/PASCAL/MODULA style keywords, but it's not like it makes any real difference which construct a language uses. >If you want to see the "closure" of that approach, if you can get access to a >set of UNIX sources, check out the source for the Bourne shell > [...] but I hear that at long last someone got fed up with fighting with >mock-Algol (yup!) and rewrote the mess Good example. I've talked to Steve Bourne about this, and he says that he made a big mistake, and that if he had it to do over again, he'd write the Bourne shell in plain vanilla C. Why do you end up "fighting with mock-Algol"? Because: there are many people in the world who are fluent in C, and many who are fluent in Algol-variants (like Pascal and Modula 2). There are almost none who are fluent in Algol-ized C. You create a problem for anyone else who must deal with your source. You also create a problem for yourself, because you prevent yourself from getting used to plain C, and *you* will have a problem with all the other C code in the world that *other* people write. Some part of your mind will keep insisting to you that all the C in the world is written wrong except yours, which is a dangerous mindset, and will tend to delay your learning curve with the language. In the late sixties and early seventies, it was all the rage in programming language design to make languages with fully redefinable syntax. It was discovered that everyone creates their own programming language that no one else can deal with, and it causes many problems for no real purpose. These days extensibility is kept very carefully under control (e.g. in ADA you can overload operators). Bottom line: sure, it's a cute approach to programming. But the best minds in computer science have tried it (and there's many others besides Steve Bourne), and have decided that it's just not the right way to go. Doug -- Doug Merritt ucbvax!sun.com!cup.portal.com!doug-merritt or ucbvax!eris!doug (doug@eris.berkeley.edu) or ucbvax!unisoft!certes!doug