tgoop.com/dereference_pointer_there/10180
Create:
Last Update:
Last Update:
#prog #article
Towards Alias-Free Pointers (PDF)
Папир из 1995 года, про который я узнал из презентации Rust: Correctness at Large, Correctness in Motion. Уже тогда была база для основы Rust! Сама статья не столь ясна, как могла бы быть, поскольку демонстрирует примеры на основе модифицированной версии Eiffel.
In this paper we argue that pointer-induced aliasing is largely a self inflicted wound, caused by the almost universal practice in programming to transfer information by copy. As a remedy for this defect we intro duce a concept unshareable objects, and the companion concept of unique pointers, which can be moved from one place to another, but which cannot be copied. We argue that unshareable objects can be employed conveniently in many, if not most, situations where dynamic objects are being used, and without incurring their pitfalls. And we show that it takes no more than minor, and virtually costless, modifications to a typical imperative programming language to support such objects.
И ещё, как отмечает автор:
Another natural application of u-objects [unshareable objects — прим. моё] is discussed in [8], where we show how such objects can be used to implement tokens — objects that, like the capabilities of operating systems, represent certain authority. Such unshareable tokens can be utilized, in particular, for the control of sharing in software systems such as object-oriented databases.
И подобный подход действительно применяется в программах на Rust, самый наглядный пример — MutexGuard.
BY Блог*
Share with your friend now:
tgoop.com/dereference_pointer_there/10180