MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Ingo Strüwing Date:December 2 2009 9:57am
Subject:Re: bzr commit into mysql-6.0-backup branch (Rafal.Somla:2895)
Bug#47940
View as plain text  
Hi Rafal,

thanks for your replies. I can't resist to reply back. :)

Rafal Somla, 02.12.2009 10:02:

...
> Ingo Strüwing wrote:
...
>> 1) Would be nice to have a "@param" line in the function header of
>> save_vp_info().
...
> Hmm, I think given function description:
...
> it is obvious that the info parameter refers to the Backup_info
> structure

...

> Thus I'll leave it as it is.


Ok, I don't force you. After all, you didn't touch the comment, hence
are not obliged to fix it.

But I think, the @param line is formally required due to the coding
guidelines. One reason might be that a Doxygen created document might
not get the parameter description right, or miss the parameter at all.

...
> Trying to answer your more general question about cleanup paradigm, I
> can only tell what are my own preferences. I never formulated them
> precisely, but I think they are something like:
> 
> - The allocator of resources should free them if possible. The allocator
> could be a function or an object.
> 
> - Whenever possible/appropriate, use objects for allocating resources
> which then will be automagically freed upon object's destruction.


I like to see function calls like "transactions". They either succeed
with all specified side effects, or fail with no (remaining) side
effects, as if they have never been called, except of the returned error.

...
> For me the main advantage of this concept is that it leaves bigger
> freedom of implementation. An iterator can be implemented for sequential
> (e.g. linked list) as well as random access containers (e.g. array).
> This allows designing interfaces which do not exclude either possibility.

In theory, you are right. Iterators have their places. Especially for
general purpose containers. But the iterator implementations, I have
seen in our code are incomplete. If someone wants to use --it, he first
needs to extend the iterator. To do that, he needs to figure out, how to
do that with the base class. So he is not better off than with stepping
over base class elements directly. The fact that you needed to add
iterator methods after changing the code that uses it, tells that story.

Regards
Ingo
-- 
Ingo Strüwing, Database Group
Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schröder,   Wolfgang Engels,   Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Häring   HRB München 161028
Thread
bzr commit into mysql-6.0-backup branch (Rafal.Somla:2895) Bug#47940Rafal Somla25 Nov
  • Re: bzr commit into mysql-6.0-backup branch (Rafal.Somla:2895)Bug#47940Charles Bell25 Nov
    • Re: bzr commit into mysql-6.0-backup branch (Rafal.Somla:2895)Bug#47940Rafal Somla26 Nov
    • Re: bzr commit into mysql-6.0-backup branch (Rafal.Somla:2895)Bug#47940Charles Bell1 Dec
  • Re: bzr commit into mysql-6.0-backup branch (Rafal.Somla:2895)Bug#47940Ingo Strüwing28 Nov
    • Re: bzr commit into mysql-6.0-backup branch (Rafal.Somla:2895)Bug#47940Rafal Somla2 Dec
      • Re: bzr commit into mysql-6.0-backup branch (Rafal.Somla:2895)Bug#47940Ingo Strüwing2 Dec