>C++ has a stronger type system, and unfortunately using C idioms punch a giant hole in that type system, and so C compatibility has a cost in terms of safety.
This may sound like C++ has a strong type system, but it's only a little stronger than that of C, if at all.
That's author's words, I'd say it's stuff like narrowing conversions, arrays and memcpy. Though the author doesn't claim that memcpy is a C idiom, and indeed it's used broadly in C++.
A properly formed modern C++ program doesn’t really use memcpy. Most idioms from the C language have a much stricter counterpart that is part of the C++ language.
You’ve made a few comments now about a language that you don’t seem to actually use or know.
Of course a C-style array in C++ doesn't have a defined end. It doesn't have an end in C either. But in C++ you don't need to be using those anyway.
Part of the issue is that, while you can use the usual C idioms in C++ (e.g. a function takes an array and its length as arguments), you don't need to, especially if you're using C++ correctly. This is one of the points of the article.
Like hellofunk said, this has nothing to do with the type system. But the solution to what you're talking about is fundamental C++: use the standard library.
> But the solution to what you're talking about is fundamental C++: use the standard library.
The safety-critical real-time embedded systems where strong static typing would be most useful often don't have the standard library available. Even in C it's not unusual to need to justify every line of code in the final product, which precludes linking against an all-inclusive libc—at best you might get a vetted subset. The design constraints, too, are often incompatible: "no vararg functions" (printf), "no recursion" (qsort/bsearch), "no dynamic memory allocation" (malloc). Where C++ is allowed it is often with additional restrictions like "no RTTI" and "no exceptions" which would rule out large portions of the STL, including most collection types. By the time you take all these coding standard issues into account you generally find that you're writing in a novel language which is just enough like C++ to cause confusion. C++ programming for these environments is not like the C++ which is taught in schools or practiced in other fields. There is a lot to unlearn.
I’m not sure what you’re talking about, to be honest. First, what does this have to do with the type system? Second, C++ typically uses vectors, which know exactly where they end, with the option to use an indexing into them that will throw an exception if you try to access them out of their range. C certainly does not have that.
This may sound like C++ has a strong type system, but it's only a little stronger than that of C, if at all.