Hacker News new | ask | show | jobs
by ropejumper 547 days ago
Yep, you're right. One way to make this less of a problem is to make this distinction at the type level, having both an owned_string and a string_view for example. You can even make owned_string store its length inline.