Path: utzoo!censor!isgtec!robert From: robert@isgtec.UUCP (Robert A. Osborne) Newsgroups: comp.lang.c Subject: Re: portability/maintenance Message-ID: <470@isgtec.UUCP> Date: 31 May 90 19:19:48 GMT References: Reply-To: robert@isgtec.UUCP (Robert Osborne) Organization: ISG Technologies Inc. Mississauga Ont. Canada Lines: 31 bevan@cs.man.ac.uk (Stephen J Bevan) writes: >Another suggestion, however, was to use dummy macros to help make >the type and purpose of parameters and functions stand out. For >example, you would have a header file containing the following >sort of definitions (the rest of this is in K&R I C, I haven't >really got into the swing of ANSI C yet) :- The biggest problem with these macros is that they are conventions, not syntactical necessities. Therefore they can be wrong in which case they are worse (far worse) than vanilla C. Another problem is that they try and hide language functionality; I know what a static function declaration *IS*; when I see PRIVATE or local or some such I immediately have to look for what it *IS*. If you can write C code cleanly in legible fashion (like I can :-), these macros just get in the way; if you can't write code cleanly the greatest macro package in the world isn't going to help. >What I'd like to know is do people actually use this, and would >they mind having to maintain code that was written this way? I would probably pass it through sed to get rid of these macros. I would HATE to maintain this style of code. >I've got to admit I kind of like the idea, but if people are going >to bitch about the code if its written in this style, then I'd >rather not use it. The problem is (as we have seen before in this group) that everybody has their own "favourite macros" and hates any other macro set. It's best not to use them at all. Rob. -- Robert A. Osborne ...uunet!utai!lsuc!isgtec!robert or robert@isgtec.uucp