Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!ukc!etive!lfcs!db From: db@lfcs.ed.ac.uk (Dave Berry) Newsgroups: comp.lang.misc Subject: Re: language commenting constructs Message-ID: <1623@etive.ed.ac.uk> Date: 23 Mar 89 16:18:26 GMT References: <1543@zen.UUCP> <10460@lanl.gov> <39273@oliveb.olivetti.com> <3452@ficc.uu.net> <18972@srcsip.UUCP> Sender: news@etive.ed.ac.uk Reply-To: db@lfcs.ed.ac.uk (Dave Berry) Organization: Laboratory for the Foundations of Computer Science, Edinburgh U Lines: 19 In article <18972@srcsip.UUCP> beede@pavo.SRC.Honeywell.COM (Michael Beede) writes: >Macros are chiefly used in C to substitue >for constants and to make up for a lack of inline functions. Most C >programmers would be happy to never see another macro if they could >use inline functions. This would imply that macros were unnecessary in C++, which is not the case (yet). Other typical uses include expressions and declarations parameterised on types, finding the offset of a field in a structure, and implementing bitsets. >If it looks like a function it should _be_ a function. Yes. Down with side-effects! (I assume that was what you meant :-) Dave Berry, Laboratory for Foundations of Computer Science, Edinburgh. db%lfcs.ed.ac.uk@nss.cs.ucl.ac.uk !mcvax!ukc!lfcs!db