Hardware Verification with SystemVerilog: An Object-Oriented Framework

Chapter 9: Thinking OOP

Highlights

NOBODY expects the Spanish Inquisition! Amongst our weaponry are such diverse elements as fear, surprise, ruthless efficiency, an almost fanatical devotion to the Pope, and nice red uniforms Oh damn!

Monty Python, episode 15, 1970

Getting your brain around OOP is a challenge. You may have followed the syntax of classes, inheritance, and so on. But when should you write new classes or use inheritance? What about owning an instance versus deriving from a class? A little befuddlement is okay OOP requires a shift in thinking, and mental fog is a natural result.

This chapter will get you "thinking OOP." A reason OOP is all muddy is that there are no rules. "Thinking OOP" is more about using a set of coding biases and lessons learned than in making trade-offs. Sure, we could have pretended there were rules, providing numbered steps such as, "first you must blah, blah, blah," or "you must always apply by blah, blah, blah," but no one would remember. Instead, this handbook tries to teach you how to ride the "OOP bicycle." Learning to "think OOP" is not trivial, but once you've learned, you never forget.

Overview

We now introduce thinking and using OOP in stages. From the first stage (the "big picture") to the last (coding), we introduce an "arsenal of weaponry" that has proved useful for programmers. This arsenal requires a few chapters. In this chapter we concentrate on framing the OOP process. We talk about the difficulties in managing complexity and creating adaptable code.

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Programming Languages
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.