Why has ALTER always been bad? Because of the potential scope of things that 
you can do with it, or because COBOL programmers will ignore or be unaware of 
any "best practice" for using it, or something else? If either of the first 
two, then away goes "EXIT PARAGRAPH/SECTION" into the bad-boys-bucket.

If the last, please elucidate, but remembering the context of the time. Bear in 
mind also that it was likely not invented out of thin air for COBOL, so likely 
"best practice" in programming at the time of COBOL's development.

I'm not suggesting the use of ALTER (that would be regarded like suggesting 
that faeces are added to your breakfast cereal), or even GO TO ... DEPENDING ON 
..., or even GO TO, or NEXT SENTENCE, or the new EXIT formats.

I am suggesting the historic record and current observable practice seem to 
indicate that the new EXIT formats will be (ab)used and new forms of minor 
chaos will ensue.

At that point, I'm not going to sit back and tell you "I told you so". I'm 
telling you now :-)

We can attempt to ameliorate with "best practice for the use of new forms of 
EXIT (if you really feel you must use them)".

To me, "structured programming" is not limited by the availability of language 
constructs for "structure". For too many, present company excluded until known 
otherwise, simple using structured constructs does not make a program 
"structured".

"Here's EXIT PERFORM, that looks like a construct in another language that is 
regarded as an aid to structured programming, so I'll use it, then my program 
will be structured". Similar to "But my program works, it uses INITIALIZE [when 
of course it doesn't, and the INITALIZEs are all of fields whose contents are 
replaced by the next line of code]", or "I got a clean compile but somehow my 
program doesn't work".

Of course, anyone can say anything bad they like about ALTER, and get away with 
it, as it is hated. Same with COBOL. As well as "external myth" there's 
self-generated internal myth (like S0C1 for reading a file which is not open, 
and many, many others).

On Thursday, 14 July 2016 06:35:39 UTC+2, Edward Gould  wrote:
> > —————————————SNIP------------------------------------
> > ALTER is bad because its not obvious when you look at a piece of code where 
> > it might actually branch to.
> > 
> 
> 
> Alter has *ALWAYS* been bad.
> 
> Ed

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to