Rosetta Code:Village Pump/Line length: Difference between revisions

(init)
 
(Applied Template:vptopic)
 
(3 intermediate revisions by 3 users not shown)
Line 1:
{{Vptopic
|topic=Line length
|summary=Discussion of appropriate line length
}}
In my web browser there are often long lines of codes that end out of the right border of the window.
I see that this occurs when the line of code is made of more than 85 characters.
Line 4 ⟶ 8:
 
Maybe we could define the maximum number of characters a line of code can contain on Rosettacode ?
:I had put a few output examples in a div box using:
:<pre><div style="width:full;overflow:scroll"></pre>
:That just puts in a scrollbar. I don't think that's what you want though is it? --[[User:Mwn3d|Mwn3d]] 20:19, 11 August 2009 (UTC)
::I don't know if more than that would be such a good idea. If a language or compiler has a max line length, then sure, but, for example, [[QBasic]]'s limit is 255 characters (I think). (Granted, I don't know what a person would do that ''requires'' such a long line, but that's not the point.) If such a limit were to be set, then all the code would have to be reviewed by '''someone''' for lines over the limit, and then edited (one way or another).
::For that matter, I can imagine puzzles and/or tasks where long lines would be a Good Thing<sup>TM</sup> (e.g. I could do a [[quine]] in a very few lines, if I were to cram several instructions onto each line... it wouldn't be pretty). -- [[User:Eriksiers|Eriksiers]] 20:25, 11 August 2009 (UTC)
 
::: What I propose is to create a template like this [[Template:Lines_too_long]], and to add it to examples with lines too long like here: [[Echo_Server#AutoHotkey]]
::: If you don't like this way to do, just remove the template
::: [[User:Blue Prawn|Blue Prawn]] 13:38, 12 August 2009 (UTC)