Live data from Hacker News

A guided intro to the Free Pascal language

getlazarus.org

101–102 of 102 posts

Re: A guided intro to the Free Pascal language

#102
post #99

Earlier quoted context omitted.

Strings and arrays are memory safe with automated reference counting And they have bounds checking, which makes it almost impossible to get buffer overflows There is an FPC-LLVM variant. Then it uses LLVM to do all the optimizations

Sorry, but the question regarding language safety is very clear-cut: either the language has an explicit model for memory safety, or it doesn't. FPC/Pascal doesn't. I am aware that it has some useful primitives which provide better safety than idiomatic C, but that isn't really what is implied by the claim that it is safer than Rust. Similarly, C++ has memory-safe strings and arrays in the STL, with automatic memory…

But Pascal strings and arrays are much safer than C++'s

C++ does not have bound checking on [].

And people write std::string& as return type or new/delete std::string, or use iterators, and that is all unsafe. Pascal does not have anything like that

Post reply on HN