6 ms·
Yes. A lot of COBOL compilers are designed to interoperate with C using a struct and unions as an overlay for working storage. It works, but it's not a conven
by GartzenDeHaes 6y ago
Yes. A lot of COBOL compilers are designed to interoperate with C using a struct and unions as an overlay for working storage. It works, but it's not a convenient way or natural way to program in C.
- ydr45 6y agoThat depends on how long your memory is regarding C. Working that way was natural and idiomatic C, once upon a time. It reflects the computer, remember.
- GartzenDeHaes 6y agoTo be clear, it's one struct consisting of char arrays and unions of char arrays.
- ydr45 6y agoYes. I was aware when I said that. C predates POSIX-like application development and grew into being useful in that role. Particularly in the sciences a lot of that COBOL arena influence went into C programs and it worked just fine. Still does. One way of looking at modern data science approaches like NumPy is reinventing array sorcery like that without the sharp edges of bare pointers, which definitely makes calculation accessible to more people (with less error). That doesn’t indict alternative approaches, however. Again, right hands, right job. Hiding the computer from the programmer is not automatically better in the general case. It’s better in many, usually in industry. That’s a subtle distinction and fully understanding it will command a salary differential going forward, for a few reasons. Not understanding it is how you get a $500k AWS bill for Spark to process a few billion records that fit in RAM on a laptop.