We know Vector is abbreviated to Vec , why isn't String abbreviated to Str ?
About Reference Counting , there are Rc , Arc , and Weak , maybe Wrc is a better name instead of Weak ?
We know Vector is abbreviated to Vec , why isn't String abbreviated to Str ?
About Reference Counting , there are Rc , Arc , and Weak , maybe Wrc is a better name instead of Weak ?
Str
would be confusing with str
, though there was some talk that with foresight, the types should've been something like Str
and StrBuf
.
There are a number of names that the team would probably choose differently if they were designing the language from scratch today. (For example, str
and String
would likely be str
and StrBuf
, similar to Path
and PathBuf
.) However, after the initial names were chosen and in use, it was generally not considered worth the disruption of changing them.
Graydon (the creator of Rust) had a fondness for abbreviations, so the names that survive from his original designs are some of the shortest. (The return
keyword used to be spelled ret
.)
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.