Re: class writer



The attached perl script generates the standard boiler-plate C
code for registering a GObject subclass.  Maybe i'm not the only
one who is sick of doing this by hand.  Comments welcome.

For what it's worth... hope this doesn't start a flamewar.

I think we should encourage the use or adaptation of Objective-C for
people trying to do the kind of dynamic object-oriented programming that
GObject (painfully) allows. The fact that preprocessor-type programs
are popping up is enough evidence for me: we should be looking to standardize
on an extension to C for Gtk+ applications development instead of making
lots of different preprocessors for different dialects. The need for
preprocessing is obviously there (we knew that in 1980 actually :-)
...why not take an additional step with this great compiled language
we're already (almost) using?

Thanks to NeXT, the GNU C compiler has had full support for ObjC
for years. Apple's current stuff is based on it (so there is actually some
objc info popping up in O'Reilly books.) And it's much smaller and simpler
than C++.

It's been on my mind ever since I learned GTK+/Gnome/Gobject programming.
I wrote an article proposing the idea earlier this year, but it didn't
quite reach critical mass yet. I have heard that there is work going on
that would mostly or entirely automate the process of creating up-to-date
language bindings for GTK+, so the idea might not be ready yet.

Here's the old article I wrote:

http://advogato.org/article/268.html

I've spent the last 18 months working on an interactive application using
an "Objects in C" style similar to that of GTK+, and I believe that it's a
dead end. There has got to be another way out for people who like objects
and like compiled languages but who don't like C++.

But folks have to care for this to work, so if you are tired of
boilerplate, speak up with ideas!!

-- 
@@@ david o'toole
@@@ dto gnu org
@@@ www.gnu.org/software/octal




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