Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm a computer science graduate, and learned languages like C, C++, C# and Java. Though I have more experience with Java. I want to develop for Linux and I'd prefer to develop for GNOME, I'm confused between choosing one from the Python and Vala.

After going through some documentation on Vala on GNOME Live pages, it seems more familiar to me compared to Python, which is quite a different syntactically compared to most languages I've learned during my graduation. While learning curve in Vala seems smaller to me. So, which language should I choose to begin development, which has better support in variety of distributions. A recommended IDE for suggested language will be appreciated.

Thanks.

share|improve this question
1  
Something no one else in this thread has suggested: you should learn Python because it is different from what you already know. It will expose you to a different way of thinking than what you learned when programming class assignments exclusively in C-like languages. Also, the syntax isn't that different. Try replacing { with : and then deleting all the } in some Java code, and it might start to look a lot more like Python. –  Ryan Thompson Apr 27 '11 at 20:08
add comment

6 Answers 6

up vote 18 down vote accepted

Other than the old argument about which programming language is better, which I won't get into (even though Python is the greatest thing since sliced bread), I'd say both are equally well suited to writing Apps for the Gnome desktop.

Pygtk, the Python GTK bindings, have been used to create applications like PiTiVi, Deluge, emesene, Exaile, Jokosher, and WingIDE.

I can't find a list of applications written in Vala (though I know about Shotwell). But since it's very much designed to be a language for the Gnome destkop, you can be pretty sure you won't be disappointed by its GTK/GObject integration.

Try them both and use which ever you like best. They are both excellent tools to create GTK Applications. You might also want to take a look at Some Vala code and Some Python code.

share|improve this answer
add comment

I'd recommend Vala. You seem to prefer object-oriented languages and Vala is object-oriented by design. Python has OOP capabilities too, but they're not that integrated into the other parts - that's why Ruby was created.

Python is considered easier to learn and use, but it's a very original language, with its own logic and philosophy; I think Vala will be easier to learn to you because it's very similar to C# and Java.

The choice also depends on what apps you're going to write. Python is good for scripting and quick prototyping, but its GTK bindings are currently poor and very slow. The language itself is at about 40 times slower than C in various benchmarks. Vala, on the other hand, is a C preprocessor, so programs written in it run very fast, and it's designed to be used in GNOME.

share|improve this answer
1  
What's 'poor' about the GTK bindings for Python? Also, I don't think Ruby was created as a reaction to Python! Apart from that, I agree with your answer. –  dv3500ea Apr 25 '11 at 18:19
    
Interpreted languages are of course slower, that is a design trade-off. To write fast python code, you write a working python implementation, profile the parts that needs optimization, and write python modules for those part in a compiled language such as C. –  Egil Apr 25 '11 at 18:55
    
@dv3500ea: actually, "I wanted a scripting language that was more powerful than Perl, and more object-oriented than Python." Not that I necessarily agree, I don't see how isn't OOP integrated with Python. –  André Paramés Apr 25 '11 at 21:38
1  
While Python itself is slow, its speed hardly matters in most cases. The really slow part of a GUI is going to the actual graphics, which still be all C. –  Brendan Long Apr 26 '11 at 3:05
add comment

I would suggest you start with Python as it's really easy to create PyGTK apps. This free book is a great resource for developing Gnome apps with Python.

Vala is great too but you'll find yourself more comfortable with Python as a beginner.

Later on, once you get acquainted with the philosophy of Unix app development, you can create parts of your app in python or vala or Javascript as you feel the need.

I would say, start with PyGTK (PyGI) to get the feel of the platform and then learn Vala and Javascript. Javascript is going to be HUGE on the Gnome desktop. I mean HUGE.

The binding for GTK, they are the same for all apps now. You'll be using the same C bindings from any language using Gobject Introspection.

share|improve this answer
    
I'm looking forward for JavaScript to take over Gnome or any desktop environment (which it already has by leaving huge impression on Gnome Shell). –  Kush Apr 26 '11 at 2:16
add comment

Python has a lot of good documentation / books. For Vala I don't know.

share|improve this answer
add comment

I would suggest wxPython (wxWidgets) along with either Boa Constructor or Aptana Studio 3 (PyDev). Python is a fantastic language for anyone to use (even children - see "Snake Wrangling for Kids"). By coding in Python/wxPython, you will be writing code that integrates beautifully with Linux but can be ported with trivial effort over to Windows and OS/X as well.

share|improve this answer
add comment

Use whatever you're most comfortable programming in. If you're going to be donating code (i.e. writing free software), you may as well enjoy it. As others have said, both languages are great for development.

share|improve this answer
    
Obviously writing free software is what is going to change everything forever. :-) –  Kush Apr 27 '11 at 15:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.