Groups | Search | Server Info | Login | Register
Groups > comp.lang.c > #391073
| From | Tim Rentsch <tr.17687@z991.linuxsc.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Which code style do you prefer the most? |
| Date | 2025-03-11 22:11 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <86cyemu931.fsf@linuxsc.com> (permalink) |
| References | (8 earlier) <8734fzozd2.fsf@nosuchdomain.example.com> <vprv83$3jah9$4@dont-email.me> <vps2sj$3k722$2@dont-email.me> <20250228141947.000056b8@yahoo.com> <vq18e1$neo2$1@dont-email.me> |
Richard Heathfield <rjh@cpax.org.uk> writes: > On 28/02/2025 12:19, Michael S wrote: > >> On Fri, 28 Feb 2025 10:24:19 +0000 >> Richard Heathfield <rjh@cpax.org.uk> wrote: >> >>> On 28/02/2025 09:22, David Brown wrote: >>> >>>> As long as it's not "Long time no C" :-) >>> >>> I'm afraid it is. Nowadays I spend most of my time arguing with >>> \LaTeX, although when I do cut code it is in C (and that's proper >>> C, of course, not this newfangled gibberish). >> >> one man's newfangled gibberish is another man's proper C > > Agreed. On the other hand, it is easy to overlook the virtue of > stability, and change does not necessarily imply progress. C is quite stable in the sense that in most cases C90 code is acceptable under C99 or C11 rules. I think there are four kinds of differences that someone might want to avoid. One, some C90 features were removed from C99. The obvious examples are implicit 'int' type and implicit function declaration. Two, some constructs are allowed in both C90 and C99 but have different semantics, or possibly different semantics. One example is what precision is used in expressions evaluated in the C preprocessor. Another example is integer division, which is well-defined in C99 but only implementation-defined in C90. Three, in some cases code that is legal in C90 is not legal in C99 (and not because features are just removed as in case one). The most obvious examples involve the use of new keywords such as 'inline' and 'restrict' as ordinary identifiers. Four, use of constructs that are newly allowed in C99 and are (obviously) legal under C99 rules but would cause diagnostics under C90 rules. An example is allowing a trailing comma in definitions of 'enum' types. If someone were to want non-C90 code (even only certain non-C90 constructs) to be given a diagnostic then obviously using C99 or later would prevent that. Are any of these cases ones that you find objectionable or would cause difficulty for code that you work on? If so which ones? My question here is meant to ask about specifics, not just general categories. And to be clear, I don't mean to limit the set of potential problems being considered to just the examples given above.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar
Re: Which code style do you prefer the most? Richard Heathfield <rjh@cpax.org.uk> - 2025-03-02 09:29 +0000
Re: Which code style do you prefer the most? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-03-03 02:17 +0000
Re: Which code style do you prefer the most? Richard Heathfield <rjh@cpax.org.uk> - 2025-03-03 02:46 +0000
Re: Which code style do you prefer the most? Kaz Kylheku <643-408-1753@kylheku.com> - 2025-03-03 03:28 +0000
Re: Which code style do you prefer the most? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-03-11 22:11 -0700
Re: Which code style do you prefer the most? Richard Heathfield <rjh@cpax.org.uk> - 2025-03-12 06:52 +0000
Re: Which code style do you prefer the most? Michael S <already5chosen@yahoo.com> - 2025-03-12 11:12 +0200
Re: Which code style do you prefer the most? Richard Heathfield <rjh@cpax.org.uk> - 2025-03-12 09:23 +0000
Re: Which code style do you prefer the most? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-03-13 00:06 +0000
Re: Which code style do you prefer the most? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-03-15 09:26 -0700
Re: Which code style do you prefer the most? Richard Heathfield <rjh@cpax.org.uk> - 2025-03-15 18:23 +0000
csiph-web