lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hakki Dogusan <hakki@dogusan.net> wrote:

> I think these magic numbers come from printer column sizes;
> normal mode:80 ch, condensed mode:132 ch.
> (for continuous form dot-matrix printers)

I love Wikipedia, you can find so much interesting information!

Apparently our 80 column standard arose due to the width of punch cards.
They were 80 chars wide and that width was simply transferred to monitors
for "high resolution", or 40 columns for "low resolution". High resolution
often also meant a monochrome display, low resolutions often meant color.
The 132 width came from line-printers, and apparently Teletype machines
were also 132 columns wide. Unix still has /dev/tty devices, so it is
amazing how long some things can stick around once they are standards.

I never would have thought the 80 column standard came from punch cards!
I got into computing in the 8-bit era, so televisions and tape drives
were the standard for display and storage!


>> What standards for code width and comments styles do you all use?
>> Not for Lua, mind you, but for C or C-like languages. Of course,
>> this will also depend on whether tabs or spaces are used... I do
>> not want to get into a debate about spaces vs tabs, I am just
>> curious about code width and comment styles is all!
> 
> I'm cutting text at 78'th column.

To maintain the most compatibility, and so I don't annoy too many people,
I probably should just stick with 80 columns maximum.

I just wanted to come up with a system that would give me more space for
comments... it seems as I get older I am becoming way more verbose with
documenting my source code, which isn't a bad thing! ;)

~Paige