comp.lang.ada
 help / color / mirror / Atom feed
* max line length
@ 2022-04-18 21:58 Thomas
  2022-04-19  6:38 ` Niklas Holsti
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Thomas @ 2022-04-18 21:58 UTC (permalink / raw)


hi :-)


how do you set your max line length?

using indentations a lot, i find that 80 is short.
but I don't realize how many people I'm going to disturb if I set a 
greater length, because I don't know all your uses.

-- 
RAPID maintainer
http://savannah.nongnu.org/projects/rapid/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: max line length
  2022-04-18 21:58 max line length Thomas
@ 2022-04-19  6:38 ` Niklas Holsti
  2022-04-21 23:34   ` Stephen Leake
  2022-04-19 19:30 ` Jeffrey R.Carter
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Niklas Holsti @ 2022-04-19  6:38 UTC (permalink / raw)


On 2022-04-19 0:58, Thomas wrote:
> hi :-)
> 
> 
> how do you set your max line length?
> 
> using indentations a lot, i find that 80 is short.


I limit lines to 80 characters, because I very often want to use a 
side-by-side diff of file versions, which means having a window wider 
than two line-lengths. Text in a 170-character-wide window is still 
readable, but wider ones are not, for me as an older guy with stiff 
eye-lenses.

To make do with 80-character lines, I often use local or partial 
use-clauses, and I divide long calls across many lines, usually having 
only one parameter per line. By a "partial use clause" I mean, for 
example, "use Interfaces", when I really need to use Interfaces.C, so I 
still have to qualify with "C.zzz" but not with "Interfaces.C.zzz".

I also group subsystems into package families (parent and child 
packages) which means that the children can directly use parent-declared 
identifiers without qualification.

Other means to keep lines short include using a small indentation step 
(I now use 3 spaces, but I'm considering changing to 2 spaces) and 
keeping subprograms short, which also helps the readability.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: max line length
  2022-04-18 21:58 max line length Thomas
  2022-04-19  6:38 ` Niklas Holsti
@ 2022-04-19 19:30 ` Jeffrey R.Carter
  2022-04-19 20:07 ` Dmitry A. Kazakov
  2022-04-21 23:31 ` Stephen Leake
  3 siblings, 0 replies; 7+ messages in thread
From: Jeffrey R.Carter @ 2022-04-19 19:30 UTC (permalink / raw)


On 2022-04-18 23:58, Thomas wrote:
> 
> how do you set your max line length?

I use the Preferences menu selection in my editor. But that's probably not what 
you intended to ask. I set mine to 132 characters.

> using indentations a lot, i find that 80 is short.
> but I don't realize how many people I'm going to disturb if I set a
> greater length, because I don't know all your uses.

When I started out, source lines were limited to 80 columns because that was the 
length of punched cards, but the line printers could print 132 columns. In the 
1980s printing switched from 14 x 11 inch paper in line printers to 8.5 x 11 
inch paper, but it was still possible to print 132 characters in landscape mode, 
so that's what I used if I had an editor that could handle long lines easily 
(screens were not large enough or high enough resolution to be suitable for 
reading programs, so I still tended to print them when that was needed. Today 
printing is not needed much, but I continue to use 132 columns. If others want a 
different line length they may reformat it.

-- 
Jeff Carter
"If I could find a sheriff who so offends the citizens of Rock
Ridge that his very appearance would drive them out of town ...
but where would I find such a man? Why am I asking you?"
Blazing Saddles
37

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: max line length
  2022-04-18 21:58 max line length Thomas
  2022-04-19  6:38 ` Niklas Holsti
  2022-04-19 19:30 ` Jeffrey R.Carter
@ 2022-04-19 20:07 ` Dmitry A. Kazakov
  2022-04-21 23:31 ` Stephen Leake
  3 siblings, 0 replies; 7+ messages in thread
From: Dmitry A. Kazakov @ 2022-04-19 20:07 UTC (permalink / raw)


On 2022-04-18 23:58, Thomas wrote:

> how do you set your max line length?

72. I used to program in FORTRAN on punched cards. (:-))

These days I use 3 split GPS windows side by side.

Then I am using the "use" clause, so I do not need a thousand of 
characters to just write Z := X + Y; (:-))

> using indentations a lot, i find that 80 is short.

Refactor the code and use local subprograms.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: max line length
  2022-04-18 21:58 max line length Thomas
                   ` (2 preceding siblings ...)
  2022-04-19 20:07 ` Dmitry A. Kazakov
@ 2022-04-21 23:31 ` Stephen Leake
  3 siblings, 0 replies; 7+ messages in thread
From: Stephen Leake @ 2022-04-21 23:31 UTC (permalink / raw)


Thomas <fantome.forums.tDeContes@free.fr.invalid> writes:

> how do you set your max line length?

120 chars; I assume readers have a big display like mine.

-- 
-- Stephe

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: max line length
  2022-04-19  6:38 ` Niklas Holsti
@ 2022-04-21 23:34   ` Stephen Leake
  2022-04-22  7:57     ` Randy Brukardt
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Leake @ 2022-04-21 23:34 UTC (permalink / raw)


Niklas Holsti <niklas.holsti@tidorum.invalid> writes:

> On 2022-04-19 0:58, Thomas wrote:
>> hi :-)
>> how do you set your max line length?
>> using indentations a lot, i find that 80 is short.
>
>
> I limit lines to 80 characters, because I very often want to use a
> side-by-side diff of file versions, 

I prefer top/bottom diff, partly for this reason.

But my monitor can easily display 240 characters across. And I have good
glasses.

-- 
-- Stephe

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: max line length
  2022-04-21 23:34   ` Stephen Leake
@ 2022-04-22  7:57     ` Randy Brukardt
  0 siblings, 0 replies; 7+ messages in thread
From: Randy Brukardt @ 2022-04-22  7:57 UTC (permalink / raw)


"Stephen Leake" <stephen_leake@stephe-leake.org> wrote in message 
news:86r15qxb83.fsf@stephe-leake.org...
> Niklas Holsti <niklas.holsti@tidorum.invalid> writes:
>
>> On 2022-04-19 0:58, Thomas wrote:
>>> hi :-)
>>> how do you set your max line length?
>>> using indentations a lot, i find that 80 is short.
>>
>>
>> I limit lines to 80 characters, because I very often want to use a
>> side-by-side diff of file versions,
>
> I prefer top/bottom diff, partly for this reason.
>
> But my monitor can easily display 240 characters across. And I have good
> glasses.

The diff program I use can scroll sideways if necessary, and so can every 
editor I've used since 1985, so this isn't generally an important concern. 
The Janus/Ada source used a "soft" limit of 80, mainly because that's what 
terminals and PCs displayed back then, but we never broke lines just for 
that reason. Typically, the indent is more than the overrun anyway (so that 
actual text never exceeded 80 characters). Of course, one has to break 
really long calls, like the call to create a window in Claw (which usually 
has a dozen or so parameters).

                                Randy.



>
> -- 
> -- Stephe 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-04-22  7:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-18 21:58 max line length Thomas
2022-04-19  6:38 ` Niklas Holsti
2022-04-21 23:34   ` Stephen Leake
2022-04-22  7:57     ` Randy Brukardt
2022-04-19 19:30 ` Jeffrey R.Carter
2022-04-19 20:07 ` Dmitry A. Kazakov
2022-04-21 23:31 ` Stephen Leake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox