Because pointer arithmetic does not take account of polymorphism, a major problem with arrays is that they do not interact well with polymorphism (see Stroustrup 06, Meyers 06), as the following example illustrates:
...
Wiki Markup |
---|
\[[Sutter 04|AA. References#SutterBibliography#Sutter 04]\] Item 100: Don't treat arrays polymorphically. |
Wiki Markup |
---|
\[[Meyers 96|AA. References#MeyersBibliography#Meyers 96]\] Item 3: Never treat arrays polymorphically. |
Wiki Markup |
---|
\[[Lockheed Martin 05|AA. References#LockheedBibliography#Lockheed Martin 05]\] AV Rule 96 Arrays shall not be treated polymorphically. |
Wiki Markup |
---|
\[[Stroustrup 06|AA. References#StroustrupBibliography#Stroustrup 06]\] What's wrong with arrays? |
...