7

Qt makes heavy use of the PIMPL idiom in their development process: https://wiki.qt.io/D-Pointer

As I've read here: "The name 'd-pointer' stems from Trolltech's Arnt Gulbrandsen, who first introduced the technique into Qt, making it one of the first C++ GUI libraries to maintain binary compatibility even between bigger release.". But nobody says what "D" stands for.

So what does the "D" stand for in D-Pointer?

463035818_is_not_a_number
  • 64,173
  • 8
  • 58
  • 126
Jacob Krieg
  • 2,430
  • 10
  • 60
  • 114
  • 1
    I believe "d" stands for "data", as d-pointer points to a structure that stores all the class' data. In other words, it's a "data-pointer". – vahancho Oct 23 '19 at 10:09
  • 1
    I've never seen a statement anywhere in Qt's documentation, but I've always thought about it in terms of d = data. More generally, a d-pointer is Qt's usage of the pimpl design pattern i.e. it's an opaque pointer. You could always view it as an upside-down p (where p is for pimpl). – Peter Oct 23 '19 at 10:23

1 Answers1

9

From this page Data Sharing with Class (an old docs from QT), it says:

Before we can share an object's private data, we must separate its interface from the private data using an idiom called "d-pointer" (data pointer)

So, d-pointer means data-pointer

Amadeus
  • 8,690
  • 3
  • 22
  • 30