Re: Cobol work?
- From: "Oliver Wong" <owong@xxxxxxxxxxxxxx>
- Date: Wed, 19 Oct 2005 21:56:16 GMT
"John Culleton" <john@xxxxxxxxxxxxxxxx> wrote in message
news:OZadnYRVUOPeKcveRVn-ig@xxxxxxxxxxxxxxx
> COBOL encourages the use of meaningful names, and other languages, at
> least
> the way they are usually taught, don't.
I'm not sure what you mean by this; I've never heard a computer science
teacher say "Don't use meaningful names", while I have heard several
computer science teachers say "(Do) use meaningful names". Some of then even
go so far as to take off marks if your program is "difficult to understand"
in their (incontestable) opinion.
> COBOL also encourages meaningful internal documentation, starting with the
> (original) IDENTIFICATION DIVISION. Other languages have commenting
> mechanisms, but those languages are neutral on the subject. And internal
> documentation is not part of the usual teaching method.
This is true. For many languages I'm familiar with, a documentation
system is usually processed by a third party application, and not the
compiler (e.g. JavaDoc, Doxygen, C#'s XML documentation system, etc.)
However, it seems that the developper's toolset is moving more and more
towards intelligent IDEs, where it starts to become difficult to know where
one tool (e.g. the compiler) ends and another (e.g. the documentation
processor) begins.
> So IMO culture as much as specific capabilities encourages readable COBOL.
> That was a principal goal of GMH when she conceived the language.
As an aside, I was surprised to discover that there actually did exist a
language which seemed to DIScourage meaningful names: The GPSS language had
"arbitrary" lengths for function names and variable (I forget the exact
figures, but it was something like all names had to be between 4 and 8
characters long), and restrictions such as variables whose type were integer
had to start with either I, J or K, and variables whose type were real had
to start with X, Y or Z (all other variables were assumed to be Strings).
I say "arbitrary", but the reason laid in the fact that GPSS programs
were originally written on fixed-grid cards, with column-based areas like
COBOL.
Assuming you wanted an integer, after the I/J/K, you only had 7
characters left with which to name the variable, so variable names were very
rarely meaningful in GPSS programs I've seen and written. To make up for it,
my GPSS programs were often documented liberally. In fact, the combined size
of just the comments often exceeded the size of the code itself.
- Oliver
.
- Follow-Ups:
- Re: Cobol work?
- From: Joe Zitzelberger
- Re: Cobol work?
- From: john
- Re: Cobol work?
- From: Michael Wojcik
- Re: Cobol work?
- References:
- Cobol work?
- From: Martik
- Re: Cobol work?
- From: Judson McClendon
- Re: Cobol work?
- From: Christopher Pomasl
- Re: Cobol work?
- From: HeyBub
- Re: Cobol work?
- From: Michael Wojcik
- Re: Cobol work?
- From: Ian Dalziel
- Re: Cobol work?
- From: John Culleton
- Cobol work?
- Prev by Date: Re: Performance Cobol Files
- Next by Date: Re: Cobol work?
- Previous by thread: Re: Cobol work?
- Next by thread: Re: Cobol work?
- Index(es):
Relevant Pages
|