TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

View Types for Rust

2 点作者 sizediterable超过 3 年前

2 条评论

sizediterable超过 3 年前
This kind of reminded me of how in Rust you can split a slice type into sub-slices, except in that case you are actually allocating space for those sub-slices. This leads me to wonder if this is possible in a zero-cost way using const generics, where you only need to store the pointer to the backing data, and the index range/length is known at compile time, e.g. Slice<T, Start, Length>.
sizediterable超过 3 年前
I also wonder how this might relate to &quot;viewpoint adaptation&quot; as defined in Pony <a href="https:&#x2F;&#x2F;tutorial.ponylang.io&#x2F;reference-capabilities&#x2F;arrow-types.html" rel="nofollow">https:&#x2F;&#x2F;tutorial.ponylang.io&#x2F;reference-capabilities&#x2F;arrow-ty...</a>