Hacker News new | ask | show | jobs
by le-mark 1875 days ago
> In the past, there was a divide between systems and application programmers. Roughly, the systems programmers took care about the details of the infrastructure and resource access, while the application programmers worried about the "business logic" of the applications.

I would add that in the era cobol was designed and rose to prominence, assembler was used for both. Cobol enshrined the application assembler practices of the time, all memory was statically declared, no dynamic memory allocation, no call stack, just gotos and conditional branching, and mapping fixed length data from tape drives into memory. Note this all made cobol very stable and even secure (no possibility for buffer overflows for example).

Also clearly not what was needed for true systems programming.

1 comments

We used PERFORM to implement calls. Whether or not implemented with a stack, it acts the same as any call/return. So to implement a simple loop to count records in a file:

PERFORM COUNT-ROWS VARYING COUNT FROM 1 BY 1 UNTIL EOF.

And the callee did:

READ INPUT-FILE AT END MOVE 1 TO EOF-FLAG.

Ah, the joys of forgetting to put a period at the end of the COUNT-ROWS paragraph.
We had some coding rules to help prevent that:

1. No unnecessary periods in the code

2. Required periods (ending paragraphs and if/then/else) go on a line by themselves