Scott Cantor wrote:
Another point regarding this is that when you use native types, people glue APIs and components together based on the fact that both APIs use those types. Then you have a brittle contract because neither component *meant* to promise that they would work together through the native type. Using a typedef prevents people from overestimating what they can combine together safely, since it requires a cast.
Wow, I didn't realize I would create so much controversy here! ;-)
I have to agree with most others that the distinction between the size of a "memory buffer" and the number of items in a container seems arbitrary.
Also, the "length" of a UTF-16 string in Xerces-C, which is now expressed in XMLSize_t is _not_ the size of a memory buffer. Rather, it is the number of UTF-16 code units, which doesn't seem much different to me than the number of attributes in a document, or the number of items in a container. After all, isn't it all about "counting" things?
Finally, I have to agree with Scott that a typedef would be better. You've no idea the number of changes I had to make in Xalan-C for compatibility with the Xerces-C changes to XMLSize_t. Luckily, about 5 years ago, we started using typedefs extensively, or I would have had to make many more changes.
Thanks! Dave --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
