4 ms·
My problem with implicit this is more, that you can access member variables, without it being explicit, i.e. about the callee, not about the caller. For the fu
by 1718627440 1y ago
My problem with implicit this is more, that you can access member variables, without it being explicit, i.e. about the callee, not about the caller.
For the function naming, nothing stops you from doing the same in C:
static dosmth (struct * s);
s->dosmth = dosmth;
That doesn't stop you from mentioning s twice. While it is redundant in the common case, it isn't in every case like I wrote elsewhere. Also this is easily fixable as written several times here, by a macro, or by using the type directly.
- Galanwe 1y agoThis is not the same, you introduced dynamic function resolution (i.e.a function pointer tied to a specific instance), we are talking about static function resolution (purely based on the declared type).
- 1718627440 1y agoTrue, if you don't trust the compiler to optimize that, then you must live with the C naming.