TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

RFC: Rust Has Provenance

55 pointsby killcoderover 1 year ago

2 comments

quelsolaarover 1 year ago
Provenance In C and Rust, essentially mean that each object, lives in its own memory space, and you cant travel between them. You cant use a pointer to one object, add an offset and get a valid pointer to another object.<p>This is key to a lot of compiler optimizations. It is de facto in C compilers, and therefor in a lot of compiler infrastructure used by other languages. There is an attempt to make it more clearly defined in the C standard:<p><a href="https:&#x2F;&#x2F;www.open-std.org&#x2F;jtc1&#x2F;sc22&#x2F;wg14&#x2F;www&#x2F;docs&#x2F;n3005.pdf" rel="nofollow">https:&#x2F;&#x2F;www.open-std.org&#x2F;jtc1&#x2F;sc22&#x2F;wg14&#x2F;www&#x2F;docs&#x2F;n3005.pdf</a>
评论 #39266336 未加载
vaylianover 1 year ago
&gt; The pointer&#x27;s &quot;provenance&quot; says where in memory the pointer is allowed to access when.<p>Is that the definition of provenance or is there a wider definition that we should know?
评论 #39213804 未加载
评论 #39213815 未加载
评论 #39216760 未加载