On Sunday 10 August 2008 01:25:31 Bernd Jendrissek wrote:

> commit d1122778e91a7bbe114692a2e40c9bd539763948
> Author: Bernd Jendrissek <[EMAIL PROTECTED]>
> Date:   Sun Aug 10 00:54:07 2008 +0200
>
>     Split object allocation from its initialization.

1. This is in no way a "general cleanup".

2. I cannot in good conscience commit this patch, sorry. If we want to use 
classes, we should either use a language which supports OO methods directly 
(e.g. C++), or let someone else maintain our class system (e.g. DataDraw or 
GObject). I have no intention of helping to maintain Yet Another C-based 
class system when there are already enough out there. Ales?

3. I don't see why this change is needed for opaque objects, unless what you 
mean by "opaque objects" is totally different from what I do.

I was under the impression that opaque objects simply meant removing the 
struct definitions from the libgeda public headers, and putting in accessors 
(or finding cleaner methods) for everywhere where the suite tools try and do 
it. This isn't that, so I don't understand what you're trying to achieve 
here.

What you're doing here actually looks to me to make it much, *much* harder for 
us to eventually change to using an OO toolkit or C++ in the end, by *adding* 
to the huge pile of class-system-unfriendly legacy code we already would have 
to plough through. Hiding definitions/adding accessors has quite the opposite 
effect.

Sorry to be so negative. 

                                  Peter :(

P.S. Thanks for the invoke-macro patch. I'll commit it in a jiffy.

>     s_basic_init_object() now only initializes an object.  It is up to the
>     object factory to allocate as much memory as it knows the object (which
>     could be a derived class) really needs.  Add a helper function,
>     s_toplevel_new_object() that wraps the calls to the factory and to
>     s_basic_init_object().
>
>     [For "object factory", read: s_toplevel_new_object().  A real
> (abstract) factory is too controversial to advocate for the mainstream
> code.]
>
>     The holy grail is opaque objects.  The first non-trivial use of an
>     abstract factory might be to sequester knowledge of GdkPixbuf into
> gschem and out of libgeda.  Conceptually, gschem would override the
> abstract factory's ::new_picture() method, returning a bigger structure
> than just PICTURE:
>
>     typedef struct st_gschem_picture GSCHEM_PICTURE;
>     struct st_gschem_picture {
>       PICTURE base;
>       GdkPixbuf *original_picture;
>       GdkPixbuf *displayed_picture;
>       /* Maybe some other stuff too. */
>     };
>
> commit d7808b37beacdfaadf28a7ce305cc99d8aabd0ab
> Author: Bernd Jendrissek <[EMAIL PROTECTED]>
> Date:   Sun Aug 10 00:47:52 2008 +0200
>
>     s_basic_init_object(): Set OBJECT type according to new parameter.

-- 
Peter Brett

Electronic Systems Engineer
Integral Informatics Ltd

Attachment: signature.asc
Description: This is a digitally signed message part.


_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev

Reply via email to