tgoop.com/dereference_pointer_there/9986
Create:
Last Update:
Last Update:
#prog #article
Fixing the Next 10,000 Aliasing Bugs
Относительно старая (март 2023 года) статья, которую стоило бы опубликовать куда раньше.
Статья, которая сначала демонстрирует, к каким багам может приводить алиасинг, а затем пошагово вводит отслеживание алиасинга в систему типов и в итоге приходит к... Rust.
Главный аргумент статьи — почему отслеживание алиасинга в принципе может быть полезно — говорит о связи между алиасингом и инвариантами:
What do all three of these bugs have in common? In every case, an invariant was violated thanks to multiple aliased references to the same value.
Invariants are essential to large scale programming, because it is impossible to hold the entire state of a system in your head at once. <...>
However, code inevitably needs to temporarily violate an invariant while performing updates. The problem comes when there are multiple references to the relevant data, and another reference observes this temporarily violated invariant.
BY Блог*
Share with your friend now:
tgoop.com/dereference_pointer_there/9986