| Robert Wagner 2004-11-17, 8:55 am |
| On 16 Nov 2004 12:00:19 -0800, riplin@Azonic.co.nz (Richard) wrote:
>Robert Wagner <spamblocker-robert@wagner.net> wrote
>
>
>Perhaps it is not so much the 'problem' with block languages, but more
>the problem that you have understanding them. Namespaces are very
>important in modern languages, and in OO. If you had been using
>Pascal, C, C++, Java, or following one of the other paths such as Ada,
>then you would know why they developed in the way they did, what
>problems they overcame, why their solutions work.
I understand that. What I dislike is their refusal to search. We're
all familiar with search engines, grep, spelling checkers, automatic
completion, etc. We know it can be done. Many of us written code to do
it.
I think they value ideological 'purity' over service to the
programmer.
>
>They are not 'unnecessary'. The qualification is only needed when
>there is a requirement to have 'records' (structs or even classes).
>This may be bacause there will be multiple occurances of the data
>items, which in Cobol would also require qualification, or because it
>is emulating what Cobol does, eg with ISAM records.
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.
>It is a matter of scalability. Writing trivial C programs may make it
>seem that qualification is 'unnecessary' (as you do), having large
>applications in C++ or Java makes it obvious that Namespaces are vital
>to keeping the code bug free and extensible.
I thought that's what prototypes and reflection were for.
>Take for example your enthusiasm for using 'ENTRY' instead of
>paragraphs. You didn't see the danger of the resulting namespace
>pollution, you don't understand namesapces. In trivial single programs
>there was no problem, but the technique, as implemented by MF Cobol,
>was not scalable. C programmers would have seen that immediately,
>recognising exactly why C++ uses name mangling for the methods, and
>why Java uses qualification.
The examples I gave were static calls. Any pollution would have been
reported at compile time.
>
>How did you survey _all_ compilers ? How did XE20 do this ?
>
>Or did you just mean 'the small subset that I noticed'.
Quote from Don Nelson, posted to this newsgroup in 1995:
"CALL was in the COBOL 74 standard and
almost all COBOL 68 implementations had a CALL even though it was not
part of the standard then (I have no idea why, since everyone knew
how to make it work)."
|