In desperation made by programming in GTK+ I realized, some of object
languages could been implemented in C, but only these not require to made
changes in programs in runtime (compiler output).
One of items is automatically cast. For example I declared variable called
Button of GtkButton and pass it to function requires GtkWidget. Why do not
automatically cast to GtkWidget (like in class hierarchy or conversion
operator in C++ or some extra constructors)? But .. it's rather conversion
operator.
It could looks like:
__gcc_parent_type GtkWidget __gcc_parent_type_for GtkButton, GtkLabel,
GtkTextView
__gcc_parent_type GtkBin __gcc_parent_type_for GtkWindow, GtkBox
What do you think?
It makes sense, because in this case there's no way to made mistake by
avoiding extra conversion. Function expected any of GtkWidget (for example),
so passing GtkButton is good. Code would be cleaner, hands will be in better
shape and we save programmers time.