logoalt Hacker News

strken10/02/20241 replyview on HN

Is COBOL actually memory safe in the same way Rust is memory safe? I thought it was just "we don't allow dynamic allocation", and I'd assume programmers often implement their own half-baked dynamic allocation on top.


Replies

rightbyte10/02/2024

Just like Rust the 'use after free' problem becomes the 'use after it does not make sense' problem instead. Which Valgrind wont find for you either.

I think new Cobol has 'allocate' and 'free' though.