Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror

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.

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.

Slashdot Top Deals

"Regardless of the legal speed limit, your Buick must be operated at speeds faster than 85 MPH (140kph)." -- 1987 Buick Grand National owners manual.

Working...