For Programmers: Free Programming Magazines  


Home > Archive > Cobol > November 2004 > Re: Infinite Loops and Explicit Exits









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Infinite Loops and Explicit Exits
Richard

2004-11-18, 3:55 am

Robert Wagner <spamblocker-robert@wagner.net> wrote

> Structures are needed in non-trivial programs; they are required in
> OO. But explicit qualification is often not necessary. In the context
> of a compiler (as opposed to interpreter), the compile step will fail
> if the name is not unique.


No. That is not true. There may be duplicate unqualified procedure
(paragraph) names without causing an error.

> I thought that's what prototypes and reflection were for.


You may think a lot of things.

>
> The examples I gave were static calls. Any pollution would have been
> reported at compile time.


No. You didn't seem to 'get' what 'pollution' was at the time, nor
understand name-mangling, or why it was used.

It would not have been reported at compile time at all. If you had
static linked two or more programs together it would have been
reported, the solution then being to change the entry names in the
programs until they were all unique across all programs. Dynamic
programs may simply have not worked correctly.

Using ENTRY is not scalable at all.

C partly solved the problem with 'static' functions. C++ solved the
problem with classes allowing 'private' and non-uniqe public names to
be used, even multiple times via namemangling. These, of course, are
qualified by the object name, which is how it should be.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com