Sujet : Re: Which code style do you prefer the most?
De : bc (at) *nospam* freeuk.com (bart)
Groupes : comp.lang.cDate : 05. Mar 2025, 17:40:51
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vq9uqh$2g9q3$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : Mozilla Thunderbird
On 05/03/2025 15:30, Anton Shepelev wrote:
Richard Heathfield:
I can now reveal that in real code those identifiers don't
exist, having been spun into existence merely to serve as
an illustration.
>
In practice, of course, one would have refactored the code
long before it reached this advanced stage of
nonsensicalitude.
Of course, but with longer identifiers, even sensible
conditions often jutt beyond the 80-character margin.
People are forgetting that in the days of 80-character hardware, identifiers were often limited to 6 characters or even fewer.
Now some use ridiculously long identifiers. And actually, some compilers don't have a cap on the length. I once tried to compile code like this with gcc:
int a, b, c;
a = b + c;
but using machine-generated billion-character identifiers. I think it worked, eventually.
The context in the thread this came up in was whether names should have any limit on the length (my tools capped them at 255 characters), and most thought they shouldn't. But even 255 characters would be hopelessly impractical if using a text editor.