Article View: comp.std.c++
Article #1898Re: true/false literal std question
From: Fergus Henderson
Date: Thu, 31 Aug 1995 18:56
Date: Thu, 31 Aug 1995 18:56
29 lines
2187 bytes
2187 bytes
Alan Griffiths <aGriffiths@ma.ccngroup.com> writes:
>What's so wrong with saying what you mean:
>[...alternative code not using `#if true'...]
There's nothing wrong with that. I'm not suggesting that making the
preprocessor recognize `true' would add any significant additional
functionality to the language - clearly using `1' suffices. Rather,
I'm suggesting that it would make the language easier to learn and
easier to use, and perhaps make some programs very slightly easier to
read and understand. Sure, you can write it using `1', but shouldn't
the version using `true' work too?
>The point is why change the language to support your idiosyncacies?
I hope that the language will be changed, not to support my
idiosyncracies, but simply *because it makes sense*. The change would
be trivial to implement, and if we don't make this change, then we
leave C++ with yet another nasty little trap for the unwary.
--
Fergus Henderson | #define x t=a[i],a[i]=a[m],a[m]=t
| char a[]=" 12345678";main(m,i,j,t){for(i=m;i<
fjh@cs.mu.oz.au | 9;x,i++)for(x,j=m;--j?(t=a[m-j]-a[m])-j&&t+j:
http://www.cs.mu.oz.au/~fjh | main(m+1)*0;);m-9||puts(a+1);} /* 8 queens */
---
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<9524403.28436@mulga.cs.mu.OZ.AU>Path:
arc1-ca.pugleaf.net!cs.mu.OZ.AU!bounce-backReferences:
<4167na$nv9@engnews2.Eng.Sun.COM> <416oev$71f@mujibur.inmind.com> <417kfc$1q3@engnews2.Eng.Sun.COM> <41881c$ihs@mujibur.inmind.com> <MATT.95Aug21105142@physics2.Berkeley.EDU> <9508310634.1386@mulga.cs.mu.OZ.AU> <809869855snz@ma.ccngroup.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c++ Path: arc1-ca.pugleaf.net!cs.mu.OZ.AU!bounce-back From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson) Subject: Re: true/false literal std question Message-ID: <9524403.28436@mulga.cs.mu.OZ.AU> Originator: fjh@munta.cs.mu.OZ.AU Sender: news@cs.mu.OZ.AU (CS-Usenet) Organization: Computer Science, University of Melbourne, Australia References: <4167na$nv9@engnews2.Eng.Sun.COM> <416oev$71f@mujibur.inmind.com> <417kfc$1q3@engnews2.Eng.Sun.COM> <41881c$ihs@mujibur.inmind.com> <MATT.95Aug21105142@physics2.Berkeley.EDU> <9508310634.1386@mulga.cs.mu.OZ.AU> <809869855snz@ma.ccngroup.com> X-Original-Date: Fri, 1 Sep 1995 03: 11:48 +1000 Date: Thu, 31 Aug 1995 18:56:42 GMT Approved: fjh@cs.mu.oz.au