Each Monday, I’m going to try to post a programming related enlightenment. It may be from a book such as the Tao/Zen of Programming or a quote.
The Tao gave birth to machine language. Machine language gave birth to the assembler.
The assembler gave birth to the compiler. Now there are ten thousand languages.
Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao.
But do not program in COBOL if you can avoid it.
- Book 1 – The Silent Void, The Tao Of Programming
Very few people, nowadays, have programmed in COBOL. I’d imagine that even fewer readers that stumble upon this entry has written or seen COBOL code, so most people will not fully understand these words from the master programmer.
Numerous years ago, we used COBOL for an “Introduction to Programming” college course. This was before Java and .NET and I don’t know why we didn’t use C – but it was probably due to the professor’s preference.
If you could update the above quote to any modern language, which one would you choose: C, C++, C#, Java, Perl, Python, Ruby, VB.NET, or something else?
I don’t think that there’s any one modern language that should be replaced in the above quote. Well, maybe C, just because of the pointers, references, strings, etc. All of the other languages have their quirks, but there’s nothing too bad about any of them.
Yup. I don’t know what Cobol is or how it looks like. First language I know is Java. Most modern languages are pretty comparable and a preferred choice of a language really is situational. I don’t think there is one language that would fit in that general statement.
Here’s a good example of how to get input and then write to a file in COBOL.
http://www.csis.ul.ie/COBOL/examples/SeqWrite/SeqWrite.htm