Random
Source Code

borrow checker

The difference between neat and correct.

In programming, a borrow checker verifies that pointers are not used in dangerous ways during compilation time to to ensure that memory is managed safely without the need of a garbage collector.

The guarantees it provides ensure the program is correct in it's usage of memory and that no illegal memory access (double-free, segmentation fault ...) is possible (even in multi threaded situation).

Because in the case of rust, it allows writing a more readable code that is always proven to have no memory issues and often resulting in better performances than their C / C++ equivalent, it is believed in the rust community that it will become a common feature for future languages in the software development industry.

- Did you know about 60% of windows internal crashes are caused by illegal memory access?
- Yes, that is because C++ does not have a borrow checker so the windows source code can't be proven to be safe.

by MajorBarnulf January 16, 2022

4👍 2👎