|
|
|
|
|
by benibela
1269 days ago
|
|
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 |
|
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.