4 ms·
It's right, that in theory I can't know what a C++ function call means. But that's also the case for C. In C I can assign a function pointer to a variable. Whe
by dan00 16y ago
It's right, that in theory I can't know what a C++ function call means.
But that's also the case for C. In C I can assign a function pointer to a variable. When the function is called through the variable, than I don't know which function is called.
Almost never the language is the problem, but their usage.
There's always context, and the quantity depends mostly on the complexity of the software. And regardless which language you use, you have to define a convention for the usage of the language, also in C.
- shoover 16y agoInteresting point about function pointers. Maybe Linus is saying (in many more words) to use virtual dispatch only in appropriate places but not as a basis for an entire language? He would be in disagreement with every language designer who has added some kind of first class dispatch or pluggable modules. Not that such disagreement would be surprising, but that seems to be what he's saying. He suggested looking to other languages for GC and concurrency support, but in that thread I didn't see any desire for dispatch or modularity beyond what C offers.