4 ms·
No it is when you know the size during runtime, or at time of construction. there is a 3rd class for constant strings known at compile time but it is mostly hi
by ratmice 4y ago
No it is when you know the size during runtime, or at time of construction.
there is a 3rd class for constant strings known at compile time but it is mostly hidden behind @"" compiler syntax.
- astrange 4y agoNS(Mutable)Strings aren’t “classes” but “class clusters”. Making them classes would be an inappropriate mix of interface and implementation. Of course, despite it being a bad idea, almost all other data structure library does do it that way. Constant strings have the same memory layout as other strings more-or-less but have different layouts for ASCII and Unicode, and in memory immutable strings have different backing classes for tagged pointer storage and for UNIX paths.