> The equivalent Java program (to use everyone's favorite punching bag) would be a tenth the length.
Not if you started dealing with real-life record format specifications, including fixed-precision numbers for currency, dates etc.
Not if you started dealing with real-life record format specifications, including fixed-precision numbers for currency, dates etc.
In shortest words: variable declaration is also used as I/O format specification. Pretty much all of IO is just reading into a buffer, and the values are automatically mapped for your use. Sure you can use the same method in pretty much every general-purpose language (mapping C structs etc), but here it comes just natural.
If you want to make the case that COBOL is still a good DSL for its niche (report generation?), it seems like there should be some straightforward examples. This is super easy to do with the aforementioned SQL or Matlab.