This is C, not C++. Keep it simple.
Here, the idea is that there is no special type for "pointer+size" (what the author proposes as an array). Ok, let's add one and see the implications.
- How do I get the size, the number of elements? A "sizeof" like operator?
- Can I resize the array? If yes, how? If no, why?
- What happens if I overflow? Undefined behavior?
- A memcpy-like would be an obvious function to implement, what happens if sizes differ?
- What is the relationship between static arrays (ex: int a[5]) and "pointer+size" arrays? Are these completely different types? Is there an implicit cast between the two?
- About casting, how can I go from a separate pointer and size to an array and vice versa? If it is possible at all.
- What if I do a bit of pointer magic to access the internal representation of the array? Probably undefined behavior.
It is much more complex than "just add array[..]", I expect more tradeoffs, more undefined behaviors (C wouldn't be C without them). Adding complexity to the language can actually make things worse.
As for zero-terminated strings, they have advantages and drawbacks. They are preferred by the C library, but you can do pointer+size if you want by using mem* instead of str* , or %.*s instead of %s in printf (not sure about this one).