On 5/14/25 07:00, David Brown wrote:
...
My interpretation matches yours. I can't find any indication in the
standard of a definition of what an "array" actually means
This is a problem with all of the derived types (6.2.5p25). There are definitions of the terms "array type", "structure type:, "union type", "function type", and "pointer type", but no definitions of the things
that those types are types of. My interpretation is that for each of
those object types, "X" is short-hand for "an object of X type".
[...]
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
Wuns Haerst <Wuns.Haerst@wurstfabrik.at> writes:
[...]
I think Thiago's idea is brilliant. He should become a
member of the standardization committee. He's welcome
to post suggestions like this here.
If someone wants to propose a revision or addition to the
ISO C standard, the appropriate newsgroup in which to post
it is comp.std.c, not comp.lang.c.
Perhaps, but comp.std.c has no official status with the ISO C
committee. I don't know if any of its members even read it.
Personally, I'm no longer picky about the division between
comp.lang.c and comp.std.c.
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
[...]
Read what people write, not what you think they meant.
This rule is a good one for other people too.
Trivially true.
If you have actually something to say to me, say it. Or don't.
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
[...]
Read what people write, not what you think they meant.
This rule is a good one for other people too.
Trivially true.
If you have actually something to say to me, say it. Or don't.
My comment was meant generally, not restricted to any
particular individual.
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
Wuns Haerst <Wuns.Haerst@wurstfabrik.at> writes:
[...]
I think Thiago's idea is brilliant. He should become a
member of the standardization committee. He's welcome
to post suggestions like this here.
If someone wants to propose a revision or addition to the
ISO C standard, the appropriate newsgroup in which to post
it is comp.std.c, not comp.lang.c.
Perhaps, but comp.std.c has no official status with the ISO C
committee. I don't know if any of its members even read it.
I expect none do, but that has no bearing on my comment.
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
[...]
It isn't just that checking the condition cannot be done in general.
To be reliable the parameter length information would need to be
part of the function's type. That has implications for type
compatibility and also for the types of pointers-to-function. And
it would mean that removing a 'static' array length specification on
a function definition would necessitate also changing the functions
declarations, plus any affected pointers-to-function. Not worth it,
even if in theory it were doable.
[...]
In my opinion, keeping a function's definition and declarations
consistent is absolutely worth it, even if the language might not
require it.
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:[...]
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
In my opinion, keeping a function's definition and declarations
consistent is absolutely worth it, even if the language might not
require it.
Without some sort of accompanying rationale, this unadorned
statement of opinion conveys no useful information.
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
In my opinion, keeping a function's definition and declarations
consistent is absolutely worth it, even if the language might not
require it.
Without some sort of accompanying rationale, this unadorned
statement of opinion conveys no useful information.
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:[...]
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
In my opinion, keeping a function's definition and declarations
consistent is absolutely worth it, even if the language might not
require it.
Without some sort of accompanying rationale, this unadorned
statement of opinion conveys no useful information.
I posted an opinion, clearly marked as my opinion. More than
eight months later, you felt the need to post a followup vaguely
expressing your opinion on my opinion.
On 28/01/2026 17:54, Tim Rentsch wrote:
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
In my opinion, keeping a function's definition and declarations
consistent is absolutely worth it, even if the language might not
require it.
Without some sort of accompanying rationale, this unadorned
statement of opinion conveys no useful information.
That's an ironically appropriate use of "this". If you'd said "that"
it wouldn't have been true.
On Sat, 31 Jan 2026 03:53:09 +0000
Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk>
wrote:
On 28/01/2026 17:54, Tim Rentsch wrote:
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
In my opinion, keeping a function's definition and declarations
consistent is absolutely worth it, even if the language might not
require it.
Without some sort of accompanying rationale, this unadorned
statement of opinion conveys no useful information.
That's an ironically appropriate use of "this". If you'd said "that"
it wouldn't have been true.
Care to elaborate for the benifit of non-native English readers?
Personally, in this particular context, I don't see how 'this' carries >different meaning from 'that'.
Michael S <already5chosen@yahoo.com> writes:
On Sat, 31 Jan 2026 03:53:09 +0000
Tristan Wibberley
<tristan.wibberley+netnews2@alumni.manchester.ac.uk> wrote:
On 28/01/2026 17:54, Tim Rentsch wrote:
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
In my opinion, keeping a function's definition and declarations
consistent is absolutely worth it, even if the language might
not require it.
Without some sort of accompanying rationale, this unadorned
statement of opinion conveys no useful information.
That's an ironically appropriate use of "this". If you'd said
"that" it wouldn't have been true.
Care to elaborate for the benifit of non-native English readers? >Personally, in this particular context, I don't see how 'this'
carries different meaning from 'that'.
English is often ambiguous. 'This' in the context of Tim's
response is ambiguous and could be interpreted to refer to
Tim's response itself, rather than to Keith's statement.
I could write a macro like:
#define ITERATE(var, from, to) for ((var) = (from); (var) < (to); (var)++)
but then anyone reading the code has to understand both how C-style
for loops work and how the ITERATE macro works. Does the expansion
use < or <=? What happens if "to" is INT_MAX? Did the author of
the macro get everything right?
Now if someone else finds that such a macro makes things easier for
them, that's fine. But often, *in my opinion*, such macros make code
harder to read for someone who knows C well.
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
[...]
I could write a macro like:
#define ITERATE(var, from, to) for ((var) = (from); (var) < (to); (var)++) >>
but then anyone reading the code has to understand both how C-style
for loops work and how the ITERATE macro works. Does the expansion
use < or <=? What happens if "to" is INT_MAX? Did the author of
the macro get everything right?
An advantage of using a macro is that these questions need be
answered only once, rather than at every place a for() loop
would appear.
Now if someone else finds that such a macro makes things easier for
them, that's fine. But often, *in my opinion*, such macros make code
harder to read for someone who knows C well.
Whether using a macro like ITERATE() makes code harder to read
or easier to read is a testable proposition, and as such it
deserves to be treated as a question of fact rather than as
a matter of opinion.
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,096 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 399:51:42 |
| Calls: | 14,036 |
| Calls today: | 2 |
| Files: | 187,082 |
| D/L today: |
2,704 files (1,665M bytes) |
| Messages: | 2,479,118 |