Hi Christian!

On Fri, 2004-03-26 at 22:05, Christian Robottom Reis wrote:
> On Fri, Mar 26, 2004 at 09:31:03PM +0100, Jan Weil wrote:
> > TBH this is one of the reasons I'm using the Ruby-GNOME2 bindings
> > nowadays.
> > I'm not sure if I should say this on pygtk's ML :)
> 
> I'm confused. You were against the idea originally:
> 
>     http://www.daa.com.au/pipermail/pygtk/2003-August/005639.html

Yes, you are right.
Meanwhile I've changed my mind about that.

> 
> -- but now you say it's the reason you're using the Ruby bindings? What
> do they do that we don't that makes you like them more <wink>?
> 

I'll try to outline the decision process.

Do you remember me struggling with Gobject properties in Python?
http://www.daa.com.au/pipermail/pygtk/2003-August/005609.html

Another crucial point was when I was trying to subclass existing
GnomeCanvasItems:
http://www.daa.com.au/pipermail/pygtk/2003-November/006386.html

At that time I was a little bit frustrated. I hadn't known anything
about Ruby til then but browsing http://www.gtk.org/bindings.html it
attracted my attention.
After reading a lot at http://www.rubycentral.com/book I decided to give
it a try. I downloaded ruby-gnome2 bindings and scanned the examples
which come with the package. I found exactly what I was looking for: One
of these sample scripts contained a subclass of GnomeCanvasGroup.

To get in touch with the language I coded Ecasound's Control Interface
in Ruby (http://eca.cx). 
It felt good!

After that I started with my own GUI for Ecasound. You can find it now
at http://visecas.sf.net. It is completely written in Ruby.

So why did I choose Ruby-GNOME2 in favour of pyGTK?

First of all (please don't read this as a flamebait) I prefer Ruby in
favour of Python. Some of _my_ reasons:
* I never really liked Python using underlines for __init__ and friends
and private object attributes.
* Python's indentation rules have sometimes been problematic for me when
I tried to execute foreign code (due to my 'expandtab' setting in Vim).
* Ruby is more consequent in that _everything_ is an object.

Now my *personal* comparison of Ruby-GNOME2 and pyGTK:

pyGTK:
+ more complete bindings
due to automated code generation
+ better (actually an outstanding) FAQ :)
+ comes with many distributions
- custom GObject properties lead to pitfalls
http://www.sicem.biz/personal/lgs/docs/gobject-python/gobject-tutorial.html
- I did not see a way to subclass gnome.canvas.CanvasGroup

Ruby-GNOME2:
+ carefully designed to fit Ruby's strengths
no code generator is used, this also leads to
- less complete bindings
+ Gnome::CanvasGroup can be subclassed :)
+ introducing custom GObject properties is simple and straight forward
- less complete docs
- not (yet) as popular as pyGTK (outside of Japan)

To sum it up: The main difference is that the Ruby bindings are not
automatically generated. IMO this leads to bindings which better suit a
certain language. And yes, GObject properties as attributes are part of
this. Consequently, I consider pyGTK partially not pythonesque enough.

As I said before, please, don't take this as a flamebait. As you can see
I'm still subscribed to this list and I think for simple GUIs the
differences are only subtle. 
Also I don't claim to be an expert in terms of different GTK+ bindings. 
It's only based on my spare experience.

Peace :)

Jan


_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to