4 ms·
Does COBOL translate easily to more modern languages? Anything tricky or odd about it? I’ve never needed to use it.
by azhenley 6y ago
Does COBOL translate easily to more modern languages? Anything tricky or odd about it? I’ve never needed to use it.
- pjmlp 6y agoCOBOL is quite modern actually, nowadays it support OOP, modules, cloud deployments, JVM and .NET backends. https://www.microfocus.com/en-us/products/visual-cobol/overview https://www.microfocus.com/en-us/products/visual-cobol/overv... Latest revision is from 2014.
- Igelau 6y agoThere's a screenshot with some source code up there. It's kind of refreshing to see function calls where the syntax for pass by reference and pass by value is literally "by reference" and "by value".
- canada_dry 6y agohttps://9b74456f2e4bcbc20970-51751c7e8fb38e7c8b474cab6c7dc602.ssl.cf5.rackcdn.com/2019-09/Visual_COBOL_for_Visual_Studio.jpg https://9b74456f2e4bcbc20970-51751c7e8fb38e7c8b474cab6c7dc60... As an old-school (i.e. >25 yrs ago) COBOL programmer its pretty jaw dropping to see that the language has continued to evolve.
- msla 6y agoModern COBOL would have a DDL which makes using JSON-like and XML-like nested data structures as easy as its existing DDL makes using record-oriented data structures.
- rhabarba 6y agoUsing COBOL is a joy, one should never NEED to use it. YMMV. :-)
- samayylmao 6y agoFirst day of intro to programming at my university and the professor was introducing himself and his background and how his first job was writing cobol at a Paper Mill. He said COBOL was a revelation at the time and that we would never need to learn or use it. Enter stage left my first job as a developer in 2016 and I'm tasked with learning cobol to support customizations to their 25 year old Lawson Implementation. I'll probably never use it again but reading and writing cobol code opened my eyes to different design patterns not often seen in more modern languages. Seeing clever implementations of features that come out of the box in modern languages was really neat.
- ivalm 6y agoThat sounds super interesting. Can you describe some of the interesting design patterns/clever implementations you saw? I feel like there is a lot of benefit in looking at weird languages as it opens your mind to new ways of solving problems.
- tapland 6y agoIt’s pretty easy and straight forward. You run into more interesting issues working with it though. I just got done (towel thrown) after a 12 hour workday where 30 minutes were code change, build, unit test and the rest was trying to get the tester, who is COBOL age appropriate, to understand how our program works, how we use APIs to communicate with other systems and how to test it. In the end the Jira errand got sent back to me because of an error in an unrelated program that we verified existed earlier today before my code was deployed, because it ‘has to be the API program’. =,) They’ve also apparently been testing all other APIs by sending simulated OK responses with the expected data <3 And remote pandemic work in a team where everyone is 2x my age has gotten me into a p. deep depression.
- retrac 6y agoOld-style COBOL translates trivially to or from very brain-dead imperative style code with lots of goto. If you can look past the syntax, modern COBOL is a decent enough compiled language, with most of the stuff you'd expect.
- jkoudys 6y agoI can't look past the syntax.
- rhabarba 6y agoWhat’s wrong with the syntax? It is essentially English with some minor rules attached.
- retrac 6y agoLike with C family vs. ML family vs. APL vs. Pascal family debates, some people consider those sort of syntax differences to be deal-breakers. I personally try to keep an open mind.
- rhabarba 6y agoI hope we can agree that APL does not fit the list here. It does not even have words! (;-))
- mumblemumble 6y agoI've come to take, "If you can look past the syntax..." as a semantically void formulation that is only there because its presence is mandatory whenever you're making a statement about a language that doesn't look like C.
- adrianmonk 6y agoIn general, I agree with you, but you could apply it in reverse: "C function pointer declarations can be useful, if you can look past the syntax."