Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Spurious diagnostic messages |
| Date | 2015-10-09 13:40 -0700 |
| Organization | None to speak of |
| Message-ID | <ln7fmvg4hh.fsf@kst-u.example.com> (permalink) |
| References | (16 earlier) <kfnh9mhgrzn.fsf@x-alumni2.alumni.caltech.edu> <lnk2rc95f3.fsf@kst-u.example.com> <kfny4fi8vvk.fsf@x-alumni2.alumni.caltech.edu> <lnoagew8da.fsf@kst-u.example.com> <kfnio6g2f6f.fsf@x-alumni2.alumni.caltech.edu> |
Tim Rentsch <txr@alumni.caltech.edu> writes:
> Keith Thompson <kst-u@mib.org> writes:
[...]
> The question I'm trying to address is Whether the language as it
> is allows the construction of a means to accomplish what is
> needed, in terms of the semantics of the operation provided. I
> believe the answer to that question is Yes. I am specifically
> not concerned (that is, for this subthread) with whether the
> means to do that is desirable based on other criteria, or whether
> it is better or worse than putting binary constants into the
> language itself. Do you see what I'm saying?
Sure, it's possible to write a macro in current standard C that
provides something quite similar to binary constants. I don't
recall ever claiming otherwise.
The issue for me (which may not be relevant to the point you're
making in this subthread) is that such a macro doesn't do me
any practical good, because I'm never going to bother to use it
in real-world code. The cost of tracking down my saved copy of
your article, including it in my code, understanding the exact
characteristics of the macro (What's the type of the expression
it yields? Does it expand to a constant expression? Exactly what
does the argument need to look like? What happens if I use an
incorrect argument? Is all this stuff documented?), plus the cost
of any readers of my code figuring out what it means and trusting
that it works correctly, exceeds the cost of just using hex constants
rather than binary constants.
BTW, I'm sure the parenthesized questions above are answerable.
I'm not asking for answers, just that they're a cost I'd have to
incur before being willing to use your macro.
If binary constants were standard, all those costs would become
irrelevant.
Of course we don't *need* binary constants in C, but we don't *need*
hex constants or strlen() either. If ISO never standardizes binary
constants, I probably won't even complain -- but I would prefer it
if they did. (And if the committee requires a detailed cost-benefit
analysis, I'm perfectly content to sit back and let someone else
do it.)
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Spurious diagnostic messages Tim Rentsch <txr@alumni.caltech.edu> - 2015-09-26 07:44 -0700
Re: Spurious diagnostic messages Keith Thompson <kst-u@mib.org> - 2015-09-26 15:33 -0700
Re: Spurious diagnostic messages Gareth Owen <gwowen@gmail.com> - 2015-09-28 19:57 +0100
Re: Spurious diagnostic messages Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-09-28 20:52 +0100
Re: Spurious diagnostic messages Jorgen Grahn <grahn+nntp@snipabacken.se> - 2015-09-29 11:19 +0000
Re: Spurious diagnostic messages glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-09-28 22:26 +0000
Re: Spurious diagnostic messages Bartc <bc@freeuk.com> - 2015-09-30 13:56 +0100
Re: Spurious diagnostic messages Gareth Owen <gwowen@gmail.com> - 2015-09-30 19:22 +0100
Re: Spurious diagnostic messages Bartc <bc@freeuk.com> - 2015-09-30 19:45 +0100
Re: Spurious diagnostic messages Tim Rentsch <txr@alumni.caltech.edu> - 2015-10-04 09:02 -0700
Re: Spurious diagnostic messages Bartc <bc@freeuk.com> - 2015-10-04 18:34 +0100
Re: Spurious diagnostic messages Tim Rentsch <txr@alumni.caltech.edu> - 2015-10-05 00:23 -0700
Re: Spurious diagnostic messages Keith Thompson <kst-u@mib.org> - 2015-10-04 15:56 -0700
Re: Spurious diagnostic messages supercat@casperkitty.com - 2015-10-04 20:04 -0700
Re: Spurious diagnostic messages Tim Rentsch <txr@alumni.caltech.edu> - 2015-10-09 09:13 -0700
Re: Spurious diagnostic messages Keith Thompson <kst-u@mib.org> - 2015-10-09 13:40 -0700
Re: Spurious diagnostic messages David Brown <david.brown@hesbynett.no> - 2015-10-10 22:26 +0200
Re: Spurious diagnostic messages supercat@casperkitty.com - 2015-10-10 13:49 -0700
Re: Spurious diagnostic messages Tim Rentsch <txr@alumni.caltech.edu> - 2015-10-14 07:53 -0700
Re: Spurious diagnostic messages Ian Collins <ian-news@hotmail.com> - 2015-09-27 17:30 +1300
Re: Spurious diagnostic messages Tim Rentsch <txr@alumni.caltech.edu> - 2015-10-04 10:26 -0700
Re: Spurious diagnostic messages Ian Collins <ian-news@hotmail.com> - 2015-10-05 17:02 +1300
Re: Spurious diagnostic messages Tim Rentsch <txr@alumni.caltech.edu> - 2015-10-09 10:06 -0700
csiph-web