Talk:Infinite loop: Difference between revisions

Content deleted Content added
Wow, where's JS?: new section
syntaxhighlight & fix lint
 
(6 intermediate revisions by 6 users not shown)
Line 1:
{{WikiProject Computingbanner shell|class=Start|importance=}}
{{WikiProject Computer scienceComputing|importance=}}
{{WikiProject Computer science |importance=Mid}}
|class=Start
|importance=Mid
}}
{{Merged-from|Alderson loop}}
Line 113 ⟶ 112:
</syntaxhighlight>
 
However, I'm sure we have all run into situations in which it was tempting to use a while ( true ), but is it bad form? <B>[[User:Tisane|<fontspan colorstyle="color:#008000;">Tisane</fontspan>]]</B> <sup>[[User talk:Tisane|talk]]</sup>/<sub>[[Special:Contributions/Tisane|stalk]]</sub> 15:33, 16 June 2010 (UTC)
 
:the rule is that every loop terminates, and when you pretend it doesn't like that, it makes the code harder to read. The example you gave is trivial, and all programming readability conventions can be ignored for trivial cases.
Line 229 ⟶ 228:
Displays:
 
<codesyntaxhighlight lang="text">This loop is a trap!
 
This loop is a trap!
 
This loop is a trap!</codesyntaxhighlight>
 
...and so on.