My personal favorite is the PCZZWSTR type, which I've only ever seen used by SHFILEOPSTRUCT. Basically it's a null-terminated collection of null-terminated strings. And of course, there's a corresponding PCZZSTR for narrow-char paths.
VC++ is... interesting.
This would basically be a modification of the "least permissions" principle—only expose old APIs to programs old enough to need them.
iOS on the other hand is ubiquitous enough and there is no one killer app that people can’t live without, Apple can deprecate and then abandon APIs and pull developers forward.
Even if the old APIs requires the user to manually right click the executable, go into properties, and enable compatibility mode? It's not hard for the user to do, but I wouldn't want it to be my users's first experience with something I made.
When I was deep into Windows development, I remember how crazy it was that MS refused to deprecate APIs.
Just the concept of a “string” when programming on Windows could be different depending on the API Microsoft had:
- standard C strings: a null terminated character array
- the standard 16 bit wide character string that was null terminated.
- a BSTR - a double byte character array where the first byte is the length.
- the C++ STL string class.
- a CString - not to be confused with the C style string. This was part of the Active Template Library
- CStringT - it’s been awhile. I have forgotten what this is.
Keeping APIs forever leads to bloat, is a maintenance nightmare, and increases the surface area for security vulnerabilities.
One of the earliest security vulnerabilities that I remember was that it was easy to run shell commands on a remote computer just by escaping the command in IE if the site was running IIS because MS overlooked a type of string encoding.
https://flylib.com/books/en/2.819.1.43/1/