Re: Cobol work?




In article <4iz5f.37655$S4.20966@edtnps84>, "Oliver Wong" <owong@xxxxxxxxxxxxxx> writes:
> "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".

I think it's a highly suspect claim. It sounds like a generalization
from anecdote. I'd like to see some evidence for it.

> > 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.)

Doxygen is "third party", but Javadoc and the C# documentation system
are part of the standard toolset from the primary vendor.

While C and C++, say, don't standardize an internal documentation
mechanism, Javadoc markup *is* a standard part of Java. Ditto for
the documentation systems of Perl and Python, for example. COBOL is
far from unique in this regard.

And using a separate tool for generating documentation is not a
compelling objection. My COBOL toolchain uses more than one step;
why should any other language be penalized for separating build steps
into separate processes? In fact, I consider that a distinct
advantage of a language implementation.

> 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.

Which is precisely why I don't like IDEs - but I don't think they're
relevant to this matter anyway. Incorporating documentation into
source code doesn't depend on IDEs in any significant way. A
developer knows how to use the toolset or doesn't; whether it's
wrapped up in an IDE is inconsequential, at least for questions of
what tools are available.

> 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).

Early BASICs had similar requirements.

Strictly-conforming C programs must not exceed the minimum limits
required of all implementations, which means that in the current
(1999) standard internal identifiers have only 63 significant (case-
sensitive) initial characters, and external identifiers have only 31
significant (case-insensitive) initial characters. That's usually
plenty, but prior to the 1999 standard the limits were 31 characters
for internal identifiers and only 6(!) significant initial case-
insensitive characters for external ones.

No one writes strictly-conforming C programs (there's a line of
argument that it's impossible to do so, because of the requirement
that a strictly-conforming program not depend on any implementation-
defined behavior), of course. And since nearly all C implementations
treated considerably more than six characters as significant for
external identifiers, that limit is almost universally ignored. But
you could have a conforming C implementation that treated all
external identifiers beginning with the same six characters as the
same identifier.

But that's not because C discourages meaningful names; it's because
it tries to support as many platforms as possible, including some
old, very limited ones.

--
Michael Wojcik michael.wojcik@xxxxxxxxxxxxxx

"Well, we're not getting a girl," said Marilla, as if poisoning wells were
a purely feminine accomplishment and not to be dreaded in the case of a boy.
-- L. M. Montgomery, _Anne of Green Gables_
.



Relevant Pages

  • Re: Enhanced Unicode support for "Go" tools
    ... Kanji or Arabic identifiers? ... find this next to impossible to read...many characters look the ... Latin characters in European languages could be included... ... I'd be 100% supportive and some Japanese source code ...
    (alt.lang.asm)
  • Re: Name for the set of characters legal in identifiers
    ... Lisp is one of the very few languages which allow ... > non-alphanumeric characters in symbols, so I was wondering if it had a ... it's an LLgrammar. ... identifiers is IMHO only a good idea in prefix and probably postfix ...
    (comp.lang.lisp)
  • Language Info Needed for GNU Aspell (fwd)
    ... GNU Aspell 0.60 should be able to support most of the Word Languages. ... script. ... The last part discusses why Aspell uses 8-bit characters internally ...
    (comp.os.linux.announce)
  • Re: Unicode Support
    ... >> (I know this is a poor example, but think about other languages, eg ... First things first, when you register your RosAsm windows classes, you ... the messages with ANSI / UNICODE parameters in ANSI or UNICODE form... ... with their alphabet characters, as with the numbers and punctuation...so, ...
    (alt.lang.asm)
  • Re: Fast UTF-8 strlen function
    ... numpad" sequence to work with UNICODE characters for Windows (for those who ... The best means is to install a bunch of "virtual keyboards"...on XP, ... you can install "input languages" and "virtual ... button...select the language and then select the keyboard (note that there ...
    (alt.lang.asm)