Re: [gnome-db] Minor API change and MySQL [update/delete]_row



> As I said, all GNOME libs never use constas the object argument
> (object_whatever (Object *object...), so we shouldn't do the same.

> hmm, no standard there I think, just look at the header files of
> some GNOME libs.

When the code breaks Gnome convention, you say it is wrong.  But to
the code that breaks standard programming convention, you live with
it.  Why?

There are objective goals like portability, simplicity, ease of use,
reducing programmer errors, and others.  And then there are guidelines
like,

  1) no const object as the first argument

  2) return const if value shouldn't be edited

  3) don't force users to cast of const

When guidelines are coined, there are rationales behind them on how
they help us achieve the said goals.  You don't apply these guidelines
just because "someone said so", or "all my friends do it".  You apply
them because they help you achieve the objective goals.

When it seems like we can't adhere to all these guidelines, we should
decide which guidelines lead us closer to the goals.  We can do this
by reexamining the rationales behind them.  In some cases, we might
even find that these guidelines aren't intrinsically in conflict, but
the fault lies in our design.

The rationales behind 2), and 3) are well known.  So, I say we find
out the origin and rationale behind 1) before we decide about
updatable/static row syntax.  Is that OK?  I'm new to Gnome
programming so, older timers (including Rodrigo) are probably more apt
at this.

:-),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]