Comment Re:Git vs Subversion (Score 3, Interesting) 173
SVN_ERR(dir_baton->edit_baton->callbacks->file_deleted
(NULL, NULL, path,
textbase,
empty_file,
base_mimetype,
NULL,
baseprops,
dir_baton->edit_baton->callback_baton));
Four level of indirection to call a method with 9 parameters... really? Come on.
This is what object-oriented programming looks like in C, when there's no C++ to make it pretty. You have function pointers and their associated "closure' context objects being passed around everywhere as pairs. And lots of tables of function pointers (vtables). So in this example, we have a local closure object (dir_baton) referencing a vtable within a parent closure object, and calling a function from that vtable.(NULL, NULL, path,
textbase,
empty_file,
base_mimetype,
NULL,
baseprops,
dir_baton->edit_baton->callback_baton));
Four level of indirection to call a method with 9 parameters... really? Come on.
Go look at GTK/GNOME: they have the same sorts of problems, though they tend to do things with a huge series of object-type macros to simulate inheritance.
The 9 parameters are there because it's a complicated routine used in different contexts. There are no 'optional' parameters like in python.