LWN.net Logo

GTK+ 3.8.0 released

GTK+ 3.8.0 released

Posted Mar 27, 2013 17:24 UTC (Wed) by Su-Shee (guest, #11056)
In reply to: GTK+ 3.8.0 released by hp
Parent article: GTK+ 3.8.0 released

The Gtk3.x bindings with Perl are a nice example of what you get with GObject bindings.

Also, if one compares Gtk2 code in Perl, Ruby and Python, the differences are seriously minor - after all you deal with widgets and callbacks. No reason why Perl couldn't deal with it nicely.

Example in C, ported to Python:

http://mikehearn.wordpress.com/2006/03/26/gtk-windows-wit...

which was the inspiration for a port 1:1 in Ruby:

http://pastie.org/343287

which I ported to Perl:

https://github.com/Su-Shee/perlsnippets/blob/master/alpha...

If you don't like Perl, don't use it.


(Log in to post comments)

GTK+ 3.8.0 released

Posted Mar 27, 2013 18:11 UTC (Wed) by HelloWorld (guest, #56129) [Link]

Perl, unlike Ruby or Python, isn't able to collect reference cycles. That's a deal-breaker for me and many others.

GTK+ 3.8.0 released

Posted Mar 28, 2013 16:06 UTC (Thu) by whilteheat (guest, #90114) [Link]

In practise I have found Perl to leak memory far less than Python and especially Ruby VMs. So not a deal breaker :)

GTK+ 3.8.0 released

Posted Mar 29, 2013 15:47 UTC (Fri) by ebassi (subscriber, #54855) [Link]

that's not entirely correct: you can override DESTROY to release cycles. or you can use the 'weaken' function from Scalar::Util.

GTK+ 3.8.0 released

Posted Apr 2, 2013 11:03 UTC (Tue) by whilteheat (guest, #90114) [Link]

It is true in my experience....

- This time last year I had to constantly restart (sometimes daily!) a Ruby background process because it kept memory leaking :(

- While I have multiple Perl background processes I've written that continue to run without a restart for over 5 years :)

So yes you have to be careful and not leave something silly around with Perl (re: DESTROY / weaken) but I've had far more success with Perl compared to Ruby (libs/VM) on this!

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds