Why do most GNOME developers prefer Python over Java for GTK+ programming?

5,443

Solution 1

Python is a much more expressive language than Java. I used to be a very enthusiastic Java developer, but after I started using Python, I'll never go back. Python is quite simply a wonderful language for all kinds of different tasks.

I haven't actually programmed much GTK with Java, but there is at least some support for GObject Introspection, which will make many libraries available even if you use Java. Also, interfaces made in Glade will be usable from Java. Using Python is mostly a matter of comfort and not necessity.

Solution 2

I'm not 100% sure about this (only 99% :P) but I think it's because Python is preinstalled on Ubuntu while Java is not. Also Python integrates GTK+ really well (http://www.pygtk.org/). At least that's the reason why I prefer Python over Java although I can't say something about Java integration. And I like Python's syntax, documentation and community more.

But as sagarchalise already said, why don't you use C if you know it? You can create your GUIs with Glade and use it in C and Python and maybe other languages.

Besides: "I really don't want to learn another language when I can work with what I already know." is a rather ... suboptimal ... attitude. You should always try to expand your horizons and look how others do things. Python is a object-oriented imperative language too and as I always say: if you know one you know them all. Sure there are some things that differ but "learning" Python is easy peasy if you know Java. I'd say give it a try.

Solution 3

I'm learning Python, as my first programming language (other than pascal in high school) I have tried learning C++ about 10 years ago and failed, never did anything with it, and I have a bunch of books on Java that I did'nt buy. And I am glad that Python is popular because it sure is a lot simpler to use than what I remember from my earlier programming days.

I don't know much about Python but if you know other languages you'll pick up Python quickly I guarantee it

Share:
5,443

Related videos on Youtube

Ayush
Author by

Ayush

Updated on September 18, 2022

Comments

  • Ayush
    Ayush over 1 year

    I only know C and Java. And I really don't want to learn another language when I can work with what I already know. I haven't ever written a GTK+ application, but I am planning to start with an experimental project. So, are there any advantages of writing in Python over Java (with respect to GTK+)?

    • Mendhak
      Mendhak over 12 years
      There's a nice series of videos covering Python with GTK over on OMGUbuntu: omgubuntu.co.uk/tag/screencasts
    • sagarchalise
      sagarchalise over 12 years
      Since you say you can program in C why not use C itself
  • NoBugs
    NoBugs about 10 years
    Java (for OpenOffice) is standard in Ubuntu, however there have been more bugs in it than other frameworks (Swing applications with goofy fonts/graphical glitches, for example.)
  • mweber
    mweber about 10 years
    @NoBugs correct me if I'm wrong but it is only the JRE that comes preinstalled, not the JDK. So you can't really start developing.