InterviewSolution
| 1. |
What Is The Design Philosophy Of The Stl? |
|
Answer» The STL exemplifies generic PROGRAMMING RATHER than object-oriented programming, and derives its power and flexibility from the use of templates, rather than inheritance and polymorphism. It also avoids new and delete for memory management in favor of allocators for STORAGE allocation and deal location. The STL also provides performance GUARANTEES, i.e., its specification requires that the containers and algorithms be implemented in such a way that a user can be CONFIDENT of optimal runtime performance independent of the STL implementation being used. The STL exemplifies generic programming rather than object-oriented programming, and derives its power and flexibility from the use of templates, rather than inheritance and polymorphism. It also avoids new and delete for memory management in favor of allocators for storage allocation and deal location. The STL also provides performance guarantees, i.e., its specification requires that the containers and algorithms be implemented in such a way that a user can be confident of optimal runtime performance independent of the STL implementation being used. |
|