The basics of type-dependent code reuse—Mark Isaacson

Save to:
Instapaper Pocket Readability

From the Modern Maintainable Code blog:

The basics of type-dependent code reuse

by Mark Isaacson

Summary:

The first article of a series on code reuse. This article provides a discussion on the role of both [basic] templates and overloading as they apply to code reuse. The article discusses answers to fundamental questions like:

  • Why is it beneficial to sometimes have the same function/struct name do different things depending on their parameters?
  • How can I reuse the same implementation code with different types?
  • How can I use the same code to invoke different fundamental implementations selected by type?

An interlude with the questions of the next Q/A style article of the code reuse series was also posted: Two fundamental implementations for one conceptual task

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.