`restricted` member variables
Paul Backus
snarwin at gmail.com
Thu Jun 23 00:05:24 UTC 2022
On Wednesday, 22 June 2022 at 23:51:53 UTC, forkit wrote:
>
> I think Stroustrup summed it up (in 1987, and with examples)
> much better than I can:
>
> " Data Abstraction Programming with modules leads to the
> centralization of all data of a type under the control of a
> type manager module."
>
> https://www.researchgate.net/profile/Bjarne-Stroustrup/publication/221496180_What_is_Object-Oriented_Programming/links/0f3175393334f4f95b000000/What-is-Object-Oriented-Programming.pdf?origin=publication_detail
If you actually look at the quote in context, what Stroustrup is
describing is essentially the PIMPL idiom, where the
representation of an abstract data type is made entirely opaque
to the code using it. This opaqueness is what leads to the
shortcomings Stroustrup describes.
D's modules do not work like this, and thus do not suffer from
those shortcomings.
Here is a link to a freely-available PDF of the linked paper, on
Stroustrup's own website, for anyone else who would like to read
it:
https://www.stroustrup.com/whatis.pdf
More information about the Digitalmars-d
mailing list