-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Summary of issue:
What should the names we use in Core
for string view and string buffer types be? What should the corresponding keywords be, if any? Should we also have a type for a nul-terminated string view, and if so, with what name?
Details:
We discussed this during the 2025-07 Carbon summit. The leading option seemed to be:
- String view type:
Core.Str
with keyword aliasstr
- String buffer type:
Core.StrBuf
with keyword aliasstr_buf
The toolchain has reached the point where it needs an answer for its implementation. We should establish a leads position on this question.
Any other information that you want to share?
For a nul-terminated string view type, Core.CStr
or Core.ZStr
might be good choices.
Another possible option would be to spell the Core.
names out in full: Core.String
and Core.StringBuffer
/ Core.StringBuf
.
A related question is what name we use for our contiguous dynamically-sized array type, for which the leading contender currently is Core.Buf
with keyword alias buf
.