Live data from Hacker News

Micro web-framework for COBOL

github.com

1–10 of 66 posts

Re: Micro web-framework for COBOL

#3
post #2

Someone's project to learn COBOL. Nothing interesting here.

Nothing interesting to you, mayhap.

I enjoyed reading through the simple code, these older languages can often seem somewhat esoteric to the uninitiated, seeing the COBOL language twisted to fitting in to an MVC-lite pattern helped me to understand what was going in - it read like the applications I'm used to seeing.

Re: Micro web-framework for COBOL

#6
From the tutorial:

>> the-values hold information about variables received. At the moment, these come from PATH (GET and POST are on the way). You can access them in the same order they occur in path.

Well, this is kinda the crux of the situation isn't it? Query parameter parsing, and POST body parsing, can't do much without these. Is this to be implemented in cobol? I really hope not, parsing anything is quiet untenable in cobol. I believe gnu/open cobol has pretty good .so binding, so you could conceivable use third party utilities like apache apr request parsing.

Why is parsing untenable in cobol? Becuase idomatic cobol doesn't provide dynamic memory allocation, or associative arrays, so you have to build up all that infrastructure from scratch.

But, the absence of dynamic memory allocation is also a characteristic that makes cobol extremely stable and safe, and mainframe applications legendarily bullet proof. All memory is required to be statically declared at compile time (similar to c-sects in assembler). So the runtime can ensure user programs play nice with each other.

Re: Micro web-framework for COBOL

#7
I actually liked COBOL. I wouldn't want to use it anymore, but as a language it was as straightforward as one could ask for.

You can clearly see how it contains the foundations for more 'modern' languages.

Well done for taking the time to explore something that's now off the beaten path.

Post reply on HN