3 ms·
D uses "phat pointers" for strings, aka a length/pointer pair. Over the years, this has proven to be simple, efficient, and resistant to errors. It means array
by WalterBright 6y ago
D uses "phat pointers" for strings, aka a length/pointer pair. Over the years, this has proven to be simple, efficient, and resistant to errors. It means array bounds checking can be automatically done. It enables efficient slicing.
String literals also have an extra 0 appended, making it transparently easy to still pass strings to C functions like printf.
- abqexpert 6y ago>"phat pointers" I don't know if that is a typo given you normally call them "fat pointers", but they are "pretty hot and tempting".