6 ms·
So COBOL has no array concept, you have to name every input feature FEAT1, FEAT2 etc? Ouch. I can see why the language is dying out.
by klipt 6y ago
So COBOL has no array concept, you have to name every input feature FEAT1, FEAT2 etc? Ouch. I can see why the language is dying out.
- rovr138 6y agoThere are "tables" in COBOL. My COBOL is rusty, but I know that it can be done. This is cool nonetheless.
- atum47 6y agothank you, glad you liked it
- atum47 6y agoyeah, please don't take this code like is good COBOL code, haha, I learned it just for this experiment.
- klyrs 6y agoI was taken with how readable it is, personally. I'd say "like python but next level" but I know at least that much history.
- forgotpwd16 6y agoWhat resources you used to learn?
- atum47 6y agojust Google
- zengid 6y agoThere are arrays, or tables, which I like to think of as being what an array of structs would be in C: https://www.mainframestechhelp.com/tutorials/cobol/cobol-array.htm https://www.mainframestechhelp.com/tutorials/cobol/cobol-arr... Also, cobol will probably never completely die. No enterprise is going to pay to rewrite systems that have been their backbone for decades. (Disclosure: I work in Logistics industry, and we have a lot of cobol that isn't going anywhere.)
- atum47 6y agoyeah, I was getting in fintech when I wrote this. A lot of banks also use Cobol to this day.
- tapland 6y agoCOBOL is everywhere. Banks, insurance companies, infrastructure. Something like 90+% of all payment transactions are still processed using COBOL. The language is fine, but it’s the rest of the mainframe that is a pain in the ass to learn. Oh, and killing ‘awesome’ modern text editors by just opening a 80k LoC file and doing basic regex searches. VS Code works well but Atom not so much.
- smabie 6y agoI mean it has to die out at some point, whether it takes decades or centuries.
- atum47 6y agowhen I shared this on reddit someone said something along the lines: in one hand this is cool but on the other hand I just wish Cobol would just die
- wruza 6y agoCOBOL seems to be very translatable to any modern language, e.g. Pascal or BASIC. Real world reasons against "why not just translate it then" are understandable, but at some point that could become economical.
- atum47 6y agoyeah, I wrote a neural network a while back to run both in front and back end. to the front end I used JavaScript and for the back python. apart from matrix multiplications (python I used numpy, JavaScript I wrote my own class) the code is almost identical. that got me wondering that I could write a program to translate a language to another. a large company could commission a (bunch of) programmer(s) to do this