Live data from Hacker News

COBOL has been “dead” for so long, my grandpa wrote about it

wumpus-cave.net

141–150 of 448 posts

Re: COBOL has been “dead” for so long, my grandpa wrote about it

#141
post #98

Earlier quoted context omitted.

Fair, I guess the list was “languages that I know were popular at one point but I don’t know anyone really using now”. Ada definitely does seem pretty cool from the little bit I have read about it. I’m not sure why it’s fallen by the wayside in favor of C and its derivatives.

Ada was mandated by the DoD for a bit. My understanding is that, in practice, this involved making a half-hearted effort in Ada, failing and then applying for a variance to not use Ada.

I actually met a programmer who worked on military jets. According to her, Ada is only used anymore for the older jets that were already programmed in it, and she worked in C++.

Re: COBOL has been “dead” for so long, my grandpa wrote about it

#142
Frankly, in all these stories about COBOL programs being modified for Y2K and whatever... isn't COBOL a compiled language? What's really amazing is that all these legacy systems have buildable source code and the toolchain to build them with i.e. that that stuff hasn't suffered "bit rot" or other neglect.

Re: COBOL has been “dead” for so long, my grandpa wrote about it

#143

Note: I'm getting some hate from others who think I would pick or prefer COBOL over a modern language. I wouldn't. I was making an outside-the-box "devil's advocate" objective observation. I just wanted to preface that here. Okay, the rest of my original comment remains below: The irony is that we already had a memory safe and stable language in Cobol that was easier to read and understand than Rust. But, no one want…

It's a bit odd to say these programs are comparable when the Cobol version isn't handling errors whereas the Rust program is (by panicking, but that's better than the silently wrong behavior of the Cobol one). Here's a runnable version of the above Cobol program (adding the necessary boilerplate); note that it prints "even" for an input of `abc` and "odd" for an input of `12`:

    identification division.
        program-id.
            even-or-odd.
    data division.
        working-storage section.
            01 num pic 9.
            01 result pic x(4).
    procedure division.
        display 'Enter number: '
    
        accept num
    
        if function mod(num, 2) = 0
            move 'even' to result
        else
            move 'odd' to result
        end-if
    
        display 'The number: ', result
    stop run.
It's peculiar to call out Rust's syntax specifically when, like most other languages these days, is mostly C-like (though with a sprinkling of OCaml). And syntax aside, Rust and Cobol have wildly different goals, so "just use Cobol" doesn't suffice to obviate Rust's purpose for existing.

Re: COBOL has been “dead” for so long, my grandpa wrote about it

#144
post #143

Note: I'm getting some hate from others who think I would pick or prefer COBOL over a modern language. I wouldn't. I was making an outside-the-box "devil's advocate" objective observation. I just wanted to preface that here. Okay, the rest of my original comment remains below: The irony is that we already had a memory safe and stable language in Cobol that was easier to read and understand than Rust. But, no one want…

It's a bit odd to say these programs are comparable when the Cobol version isn't handling errors whereas the Rust program is (by panicking, but that's better than the silently wrong behavior of the Cobol one). Here's a runnable version of the above Cobol program (adding the necessary boilerplate); note that it prints "even" for an input of `abc` and "odd" for an input of `12`: identification division. program-id. eve…

Good catch! My cobol is rust-y. :D

I guess my post is getting misread as "just use cobol" when it was more of a XKCD-like reflection; e.g. why did we all do that / keep doing that. We done did Cobol, and Rust. And, one is "dead" but not really and now here we are.

https://xkcd.com/927/

Re: COBOL has been “dead” for so long, my grandpa wrote about it

#145
huh so are any languages actually dead? ChatGPT mentions FORTRAN, ALGOL, or Pascal... which I don't think are dead at all.

Ada I've never heard of, so maybe that one's dead?

If they're able to write WebAssembly compilers for all these languages, then they'll probably live forever!

The only reason punchcards are "dead" is bc the machines are gone or mostly unavailable...

Re: COBOL has been “dead” for so long, my grandpa wrote about it

#146
post #23

Earlier quoted context omitted.

The modern analogue of 4GLs would be the promise of LLMs letting you write prompts so you don't have to learn a programming language; the promise of the original 4GLs like Pearl (not to be confused with perl) and Objectstar was to let you have non-programmers writing business logic without being COBOL or FORTRAN programmers.

Ironically, the whole reason COBOL has its weird-ass syntax was to let you have non-programmers writing business logic without being assembly or C programmers. We can see how well that worked.

I think about that every time I hear someone saying LLMs will make programmers unemployable. There’s no doubt that the work will change but I think a lot of the premise is based on a fundamental misunderstanding of the problem: business systems are just more complex than people like to think so you’re basically repeating https://xkcd.com/793/ where people higher on the org chart think the problem is just cranking out syntax because they “know” how it should work.

I think we’ve had at least 4 generations of that idea that reducing coding time will be a game-changer: the COBOL/SQL era of English-like languages promising that business people could write or at least read the code directly, 4GLs in the 80s and 90s offering an updated take on that idea, the massive push for outsourcing in the 90s and 2000s cutting the hourly cost down, and now LLMs in the form being pushed by Gartner/McKinsey/etc. In each case there have been some real wins but far less than proponents hoped because the hard problem was deciding what it really needed to do, not hammering out syntax.

There’s also a kind of Jevons paradox at work because even now we still have way more demand than capacity, so any productivity wins are cancelled out. At some point that should plateau but I’m not betting on it being soon.

Re: COBOL has been “dead” for so long, my grandpa wrote about it

#147

Note: I'm getting some hate from others who think I would pick or prefer COBOL over a modern language. I wouldn't. I was making an outside-the-box "devil's advocate" objective observation. I just wanted to preface that here. Okay, the rest of my original comment remains below: The irony is that we already had a memory safe and stable language in Cobol that was easier to read and understand than Rust. But, no one want…

Sorry, https://www.ibm.com/docs/en/cobol-zos/6.2?topic=statement-ex... seems to be demonstrating a language that is not memory-safe (maybe it used to be, but how?)

  COMPUTE SIZE-NEEDED = LENGTH OF OBJ + LENGTH OF VARTAB * NUM-ELEMENTS
  ALLOCATE SIZE-NEEDED CHARACTERS INITIALIZED RETURNING VPTR
  SET ADDRESS OF VARGRP TO VPTR
  MOVE NUM-ELEMENTS TO OBJ
  MOVE BUFFER(1:SIZE-NEEDED) TO VARGRP
  SET VPTR TO ADDRESS OF BUFFER
  FREE VPTR

Re: COBOL has been “dead” for so long, my grandpa wrote about it

#149
post #77

Note: I'm getting some hate from others who think I would pick or prefer COBOL over a modern language. I wouldn't. I was making an outside-the-box "devil's advocate" objective observation. I just wanted to preface that here. Okay, the rest of my original comment remains below: The irony is that we already had a memory safe and stable language in Cobol that was easier to read and understand than Rust. But, no one want…

Shell script is memory safe too, but you don't write anything longer than 100 lines in it for a reason.

Besides - standard COBOL is only "memory-safe" by way of not supporting dynamic memory allocation. Like, at all. Even strings are stored in fixed-length arrays.

"A ship in harbor is safe, but that is not what ships are built for."

Re: COBOL has been “dead” for so long, my grandpa wrote about it

#150

huh so are any languages actually dead? ChatGPT mentions FORTRAN, ALGOL, or Pascal... which I don't think are dead at all. Ada I've never heard of, so maybe that one's dead? If they're able to write WebAssembly compilers for all these languages, then they'll probably live forever! The only reason punchcards are "dead" is bc the machines are gone or mostly unavailable...

Ada is still updated, last released in 2023. Given its original audience is the Department of Defense, it seems to me very likely it is far from dead.
Post reply on HN