Liste des Groupes | Revenir à cl c |
bart <bc@freeuk.com> writes:At least the keyword would now be 'appropriate'.On 22/04/2025 00:12, Keith Thompson wrote:So you wouldn't mind if C had both `while (expr)` andbart <bc@freeuk.com> writes:>On 21/04/2025 22:06, Waldek Hebisch wrote:You think it's inappropriate.bart <bc@freeuk.com> wrote:>
t iteration goes over all elements in the hash table.BTW2: When looking at 'for' loop you are supposed to see pattern,>
without need to track all steps.
That's one of the disadvantages of using the same, often
/inappropriate/ keyword for every kind of pattern.
Would your objections go away if a different keyword were used?
I already said that I would have prefered if 'while' was used.
>
Then either 'for' wasn't used, or was used for the kind of for-loop
that is common in other languages.
`while (expr1; expr2; expr3)`, with the latter having the semantics
of C's current for loop?
But that doesn't answer my question. You'd prefer "while", but wouldIf a separate 'for' didn't exist, then there'd be mostly the same problems, but it would be slightly less annoying: at least there is no pretence that linked-list traversal is anything to with iterating from A to B.
using "while" rather than "for" resolve your objections?
For example, in my post to which you replied, I discussed atWell I care about it too, and I would write such things more sensibly as well. But so what? Most code I see tends to be badly formatted. For-headers are not split up unless they're long enough to overflow the line.
some length how I like to split for loops if they're too long.
You snipped that discussion *and then* insinuated that I don't care
about complex loops written on one line. Please stop doing things
like that.
Les messages affichés proviennent d'usenet.