With a pointer you have complete (input/output) signature of the function so a reasonable compiler can take a constant pointer and lower to fixed function call (or even inline it) (visual-c fails here AFAIK) which gives overriding. The internal memory mangers of WebKit mimic traits by doing this.
View all comments
Show parent comment
2
u/marc_b_reynolds Jun 11 '26
"Mine is not to reason why". But a function pointer needs to point the correct target function (which has been used to mimic "function overriding")