Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| X-Received | by 10.66.189.195 with SMTP id gk3mr2981721pac.16.1370070601918; Sat, 01 Jun 2013 00:10:01 -0700 (PDT) |
|---|---|
| MIME-Version | 1.0 |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!lp19no40820822pbb.0!news-out.google.com!bp1ni30159pbd.1!nntp.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail |
| NNTP-Posting-Date | Sat, 01 Jun 2013 02:10:01 -0500 |
| Return-Path | <cppmods@mcgurn.dreamhost.com> |
| Sender | std-cpp-request@vandevoorde.com |
| Approved | james.dennett@gmail.com |
| Message-ID | <FYudnZUOv-jV2DXMnZ2dnUVZ_oOdnZ2d@earthlink.com> (permalink) |
| Newsgroups | comp.std.c, comp.std.c++ |
| From | "Paul D. DeRocco" <pderocco@ix.netcom.com> |
| Subject | Re: A preprocessor feature we should have had 40 years ago |
| Organization | unknown |
| References | <UrKdnTRjb8pONQDMnZ2dnUVZ_oudnZ2d@earthlink.com> <5444b5db-2bba-4b3a-a3ae-522607837c5c@g9g2000yqh.googlegroups.com> |
| X-Original-Date | Thu, 30 May 2013 23:38:07 -0700 |
| X-Submission-Address | std-cpp-submit@vandevoorde.com |
| To | undisclosed-recipients:; |
| Date | Sat, 1 Jun 2013 02:04:58 CST |
| Lines | 51 |
| X-Usenet-Provider | http://www.giganews.com |
| X-Trace | sv3-pmBQQ8OaoenY+kcfBxIKWVB+DQdXMZ+qNCUBrRRTGSEQRoau0RIT4lh2Z71TUVkpFYVpxhn3/laqmYQ!fUncMvbVXk0QNfKah82B/yxHC9Z4LMT/dpeAzk4vmVUYw80dXA2Mb3KVoTvsX63Rdl6bzuzKMMN1!LA== |
| X-Complaints-To | abuse@giganews.com |
| X-DMCA-Notifications | http://www.giganews.com/info/dmca.html |
| X-Abuse-and-DMCA-Info | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info | Otherwise we will be unable to process your complaint properly |
| X-Postfilter | 1.3.40 |
| X-Original-Bytes | 3569 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Xref | csiph.com comp.std.c:2024 comp.std.c++:631 |
Cross-posted to 2 groups.
Show key headers only | View raw
> On 5/30/2013 6:40 PM, Peter wrote: > > > Over many years, I have heard two main arguments against this kind of > feature. > > The first is the "slippery slope" argument. Where do you stop? What > about a preprocessor-while statement? A preprocessor-for statement? > Arithmetic statements? A library of string functions? A library of > arithmetic functions? User-written preprocessor functions? Etc, etc. > Over the years I have had occasions where all of these would have been > useful. It would be very hard to draw a line, but all the imaginable > and useful features could result in a mess. A simple 0 to n-1 count seems like a likely stopping point. (My more fanciful string-to-char iterator is perhaps a bridge too far.) A "while" construct doesn't make much sense, since there is nothing that can change value in an unpredictable manner in the preprocessor, and that therefore can't be boiled down to a simple count. > The second argument is, if you want that, you can create it. In many, > if not most, programming environments, it would be simple to insert a > customized preprocessor into the compilation sequence. You just have > to write it, and use it. There are in fact a few extended > preprocessors out there. I have had occasion to use tools like 'sed' > as a preprocessor. That creates a barrier to distribution, because you can no longer just ship some .cpp and .h files; you also have to ship either an executable tool for whatever platform someone might wish to compile the program with, or source for the executable tool; and then you have to provide a customized makefile for the program that includes the appropriate rule, which presumes the use of a particular make utility since they're not standardized the way the language is. Oh, well. -- Ciao, Paul D. DeRocco Paul mailto:pderocco@ix.netcom.com [ comp.std.c++ is moderated. To submit articles, try posting with your ] [ newsreader. If that fails, use mailto:std-cpp-submit@vandevoorde.com ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Back to comp.std.c++ | Previous | Next — Previous in thread | Next in thread | Find similar
A preprocessor feature we should have had 40 years ago "Paul D. DeRocco" <pderocco@ix.netcom.com> - 2013-05-23 19:18 -0600
Re: A preprocessor feature we should have had 40 years ago Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-05-24 15:19 -0700
Re: A preprocessor feature we should have had 40 years ago jacob navia <jacob@spamsink.net> - 2013-05-25 02:23 -0700
Re: A preprocessor feature we should have had 40 years ago Keith Thompson <kst-u@mib.org> - 2013-05-25 02:24 -0700
Re: A preprocessor feature we should have had 40 years ago "Kenneth \"Bessarion\" Boyd" <zaimoni@zaimoni.com> - 2013-05-25 23:43 -0700
Re: A preprocessor feature we should have had 40 years ago "Paul D. DeRocco" <pderocco@ix.netcom.com> - 2013-05-25 23:44 -0700
Re: A preprocessor feature we should have had 40 years ago Francis Glassborow <francis.glassborow@btinternet.com> - 2013-05-26 08:52 -0600
Re: A preprocessor feature we should have had 40 years ago Rui Maciel <rui.maciel@googlemail.com> - 2013-05-25 23:43 -0700
Re: A preprocessor feature we should have had 40 years ago Peter <pcurran88@googlemail.com> - 2013-05-30 19:40 -0600
Re: A preprocessor feature we should have had 40 years ago "Paul D. DeRocco" <pderocco@ix.netcom.com> - 2013-06-01 02:04 -0600
Re: A preprocessor feature we should have had 40 years ago ootiib@hot.ee - 2013-06-01 14:53 -0600
Re: A preprocessor feature we should have had 40 years ago James Kuyper <jameskuyper@verizon.net> - 2013-06-04 10:41 -0600
Re: A preprocessor feature we should have had 40 years ago espie@lain.home (Marc Espie) - 2013-06-05 23:12 -0700
Re: A preprocessor feature we should have had 40 years ago James Kuyper <jameskuyper@verizon.net> - 2013-06-06 09:20 -0700
Re: A preprocessor feature we should have had 40 years ago Jens Schweikhardt <usenet@schweikhardt.net> - 2013-06-09 02:21 -0700
csiph-web