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.

View Types for Rust

2 pointsby sizediterableover 3 years ago

2 comments

sizediterableover 3 years ago
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>.
sizediterableover 3 years ago
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>