On 24/09/2022 9:48 pm, Kirk Wolf wrote:
On Fri, Sep 23, 2022, at 6:09 PM, Paul Gilmartin wrote:
On Fri, 23 Sep 2022 23:18:21 +0200, Bernd Oppolzer wrote:
Many thanks for these links;
I especially appreciate the tutorials by Brian Will "Object-Oriented
Programming is Bad",
https://www.youtube.com/watch?v=QM1iUe6IofM
Far worse is the attempt to use OO techniques in non-OO languages.
"Where is this function called?"
"A pointer to it is saved in a struct."
After that, it's anyone's guess.
Some of the very best, most ubiquitous C-language software uses object-based techniques
such as you describe ("struct with function pointer" interfaces). It's
actually quite common, and when used correctly it provides for separation of concerns in
large systems. Granted, some bad software uses it too :-)
Indeed. A perfect example is the Linux VFS (Virtual File System) which
sure looks like a polymorphic plugin implementation using function
pointers to me ;) https://tldp.org/LDP/khg/HyperNews/get/fs/vfstour.html
Kirk Wolf
Dovetailed Technologies
http://coztoolkit.com
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN