10 Things I Hate About You, COBOL
Actually, I don't hate COBOL. I just couldn't resist the blog title. But there are some things about it that I find annoying. 1. All Variables are Global Global variables make it difficult to track down bugs; when a variable can be changed at any point in the code it's hard to tell what happened. In COBOL, every variable is a global variable. 2. No Parameter Passing In most languages, you can pass parameters to subroutines. But you can't do that in COBOL. So how do you move data to a subroutine for processing in COBOL? You put it in … global variables. 3. No Returning Values Just like you can’t pass values to a subroutine, you can’t return values from one either. You can, however, store the results in…global variables. 4. Verbosity They say it was designed so non-technical people could read it. Problem is, non-technical people don't read it. I've worked in three shops that used COBOL. None of them had non-programmers looking over COBOL code. S