gnucobol-users
[Top][All Lists]
Advanced

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

Re: [open-cobol-list] Fixed vs Free Format


From: Andrew Pennebaker
Subject: Re: [open-cobol-list] Fixed vs Free Format
Date: Thu, 17 Nov 2011 16:12:07 -0500

Honest questions from a newbie:
Can we subsume fixed format into free and have the compiler encourage people to use free but never complain when we code in fixed?

Whitespace is a good way to visually separate components of a larger system. Since code proceeds line by line, vertical whitespace is a powerful way to make code more readable. Horizontal whitespace in the form of tabs and spaces helps to indicate nested blocks of code. I agree that whitespace makes code much more readable.

However, requiring seven spaces before each line of code is just silly. It adds no whitespace; it just shifts all code over. You might as well drag a text editor window over to the right; it's aesthetically identical and adds just as much "readability". I realize the historicity of the extra characters, but tradition /= good practice. We have text editors to show line numbers, so we don't need that column any more.

There is indeed the potential for breaking backwards compatibility, and for alienation of people who prefer the spurious spaces. But computers exist to automate; there's no technological reason that OpenCobol can't read a .cob file, decide for itself which format is being used, fixed or free, and run with it. One solution is to read the first line: If there are six spaces and a star, consider the file to be in fixed format. If there are no spaces, consider the file to be in free format. Or you could go so far as statistical analysis to determine which format is being used more often in a file, and inform the coder of the exceptions. There are myriad ways to make fixed and free coders happy, all without requiring flags or setting defaults.

Cheers,

Andrew Pennebaker
www.yellosoft.us

On Thu, Nov 17, 2011 at 3:48 PM, john Culleton <address@hidden> wrote:
On Thu, 17 Nov 2011 15:42:24 -0500
Andrew Pennebaker <address@hidden> wrote:

> Can -free be the default in future versions?
>
> Cheers,
>
> Andrew Pennebaker
> www.yellosoft.
I prefer fixed as the default. COBOL is designed to be readable.
The fixed format aids in that.

--
John Culleton
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html

"Create Book Covers with Scribus"
http://www.booklocker.com/books/4055.html

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
open-cobol-list mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/open-cobol-list


reply via email to

[Prev in Thread] Current Thread [Next in Thread]