|
|
|
|
|
by Galanwe
300 days ago
|
|
I don't quite agree, especially because the implicit this not only saves you from explicitly typing it, but also because by having actual methods you don't need to add the struct suffix to every function. mystruct_dosmth(s);
mystruct_dosmthelse(s);
vs s->dosmth();
s->dosmthelse();
|
|
For the function naming, nothing stops you from doing the same in C:
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.