Vala Programming/Concepts/Objects

Object Oriented Programming
The Vala OO System is very similar to, and is somewhat based on languages like C and Java. Please note that unlike these languages, Vala does not force you to adopt and Object Oriented Paradigm, but it is highly recommended for maximum productivity; and because most third-party libraries and bindings use Object-Orientation, it will ultimately have to be adopted by you.

Classes
Generally Classes in Vala are declared like this:

Note that if you declare a base class, it is recommended to derive it from the GLib.Object, otherwise you will not be able to access some of its features.

Inheritance
Inheritance in Vala is very similar to C. Vala supports single inheritance only, i.e you cannot inherit an object from more than one base class. The general format is: