Hacker News new | past | comments | ask | show | jobs | submit login

Spans are just a slice type, but those which any type based on contiguous memory can be coerced to (usually). I’m sure you’re already using them somewhere without realizing that. Their main use case in regular code is zero-cost slicing e.g. text.AsSpan(2..8).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: