3 ms·
Is COBOL really understandable after 14 years?
- thwarted 18y agoThe few COBOL programs I've seen (or had to deal with the output of) always seemed to handle fixed-width fields. Does COBOL have support for variable-width fields? And how would this lessen the verbosity of those record definitions? Modern regular expression and scattering assignment in scripting lanaguages (name, address1, address2, city, state, zip) = record.split(/\t/) is somewhat self-documenting also. Dealing with fixed-width records even in modern languages can be pretty verbose name = substr(0, 40) address = substr(41,60) ... as well (and the regular expression for fixed-width record parsing can easily become visibly unparsable, sometimes even if you use things like the /x modifier in perl). I'd like to see a side-by-side comparison of COBOL vs modern scripting languages for some common tasks like report generation. And I'd like to see how COBOL tackles something hairy like extracting data from consistently defined but unregular inputs like HTML or wiki markup (this is fresh on my mind: I just was writing some perl/shell scripts last night to generate structured data from a bunch of pages on wikipedia), which is a more "modern" problem than the stock COBOL example of fixed-width reports. Any links to show how COBOL really shines? Where using COBOL is a significant win from an understandability and maintainability standpoint?