Sane API design (AKA C's #ifdef hell)
Araq
rumpf_a at web.de
Fri Apr 17 15:16:48 UTC 2026
On Thursday, 16 April 2026 at 23:59:53 UTC, H. S. Teoh wrote:
> (The same argument can be made for code that overuse dynamic
> binding, like heavily-OO code. Or in C, code that overuse
> function pointers. The former is a little more manageable
> because there are tools for working with OO; the latter can be
> really evil because the func ptrs are ad hoc rather than
> following, say, a class hierarchy, so they can literally point
> to *anything*. Good like figuring out where your function calls
> are going when there's a bug.)
Actually they can only point to prototype compatible functions
and you can use an IDE/langserver to find out where the function
pointers are assigned to. Or you use a debugger and inspect the
callstack. Welcome to the world of tooling from the 90ies.
More information about the Digitalmars-d
mailing list