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
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
Similarly, C++ has memory-safe strings and arrays in the STL, with automatic memory management, allocation, etc., but it is also not "as safe as Rust." On top of that, FPC lacks any equivalent of the borrow checker. Automated reference counting is a good feature, but it won't stop you from writing race conditions. Borrow checking can, which is pretty powerful.
Using FPC with LLVM will indeed give you LLVM optimization passes, but it's got quite a lot of limitations. I'd probably opt to use the FPC native code gen.
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