[Vala] How to check if GLib.List is empty?

2014-12-02 Thread Виталий Кирсанов
Hello list. Probably there is a well-known answer to this but I failed to find it. Native C glib states that a null pointer GList is a valid list and it can be used as an argument to various list operations such as g_list_append(). And to check whether the list is empty you need just to compare t

Re: [Vala] How to check if GLib.List is empty?

2014-12-02 Thread Luca Bruno
On 02/12/2014 16:03, Виталий Кирсанов wrote: > Hello list. > > Probably there is a well-known answer to this but I failed to find it. > > Native C glib states that a null pointer GList is a valid list and it can > be used as an argument to various list operations such as g_list_append(). > And to c

Re: [Vala] How to check if GLib.List is empty?

2014-12-02 Thread Michael Catanzaro
On Tue, 2014-12-02 at 19:03 +0400, Виталий Кирсанов wrote: > Is there a more simple and efficient way? If you don't have to use GLib.List, you can use Gee.List, which is much easier to use and doesn't have this problem. signature.asc Description: This is a digitally signed message part _

Re: [Vala] How to check if GLib.List is empty?

2014-12-02 Thread Виталий Кирсанов
Hm, indeed. The following piece of code works fine: int main(string[] argv) { List list = new List(); assert( list == null ); return 0; } So this seems to be the answer to my question. But still there are two weird things in my opinion: - Why I need to call operator new if the re

Re: [Vala] How to check if GLib.List is empty?

2014-12-02 Thread Luca Bruno
On 02/12/2014 16:34, Виталий Кирсанов wrote: > Hm, indeed. The following piece of code works fine: > > int main(string[] argv) > { > List list = new List(); > assert( list == null ); > return 0; > } > > > So this seems to be the answer to my question. But still there are two > weird thi

Re: [Vala] How to check if GLib.List is empty?

2014-12-02 Thread Luca Bruno
On 02/12/2014 16:51, Dmitry Golovin wrote: > List list = new List<>(); > Would diamond operator be implemented in the future? Anyone needs it? var list = new List(); ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/v

Re: [Vala] How to check if GLib.List is empty?

2014-12-02 Thread Dmitry Golovin
Hello all! I just tried to compile this: > int main(string[] argv) > { > List list = new List(); > assert( list == null ); > return 0; > } It compiles and runs. But this one doesn't compile: > int main(string[] argv) > { > List list; > assert( list == null ); > return 0;

Re: [Vala] How to check if GLib.List is empty?

2014-12-02 Thread Dmitry Golovin
> var list = new List(); Looks nice and clean. Thanks. 02.12.2014, 17:54, "Luca Bruno" : > On 02/12/2014 16:51, Dmitry Golovin wrote: >>  List list = new List<>(); >>  Would diamond operator be implemented in the future? Anyone needs it? > > var list = new List(); _

[Vala] Perfect Vala IDE

2014-12-02 Thread Dmitry Golovin
Hello all! I don't want to start another vim vs emacs holywar. I want to know if there exist an all-in-one IDE (like Eclipse) for Vala. I tried valama, but it is crashing all the time and I don't know how to fix it. Gnome Builder is now in very early stage of development. What IDE do you use fo

Re: [Vala] Perfect Vala IDE

2014-12-02 Thread Luca Dionisi
Gedit (3.10.4) with valencia (0.8.0) on Ubuntu 14.10 On Tue, Dec 2, 2014 at 6:59 PM, Dmitry Golovin wrote: > Hello all! > > I don't want to start another vim vs emacs holywar. I want to know if there > exist an all-in-one IDE (like Eclipse) for Vala. > > I tried valama, but it is crashing all th

Re: [Vala] Perfect Vala IDE

2014-12-02 Thread Andres Fernandez
El 02/12/2014 15:07, "Dmitry Golovin" escribió: > > What IDE do you use for your vala code? I use Anjuta for Vala. I really like it. Andrés Fernandez Software Peronista ___ > vala-list mailing list > vala-list@gnome.org > https://mail.gnome.org/mailman

Re: [Vala] Perfect Vala IDE

2014-12-02 Thread rastersoft
Hi: If you use Autovala, you can use the plugins for Gedit or Scratch-Text-Editor. El 02/12/14 a las 18:59, Dmitry Golovin escribió: Hello all! I don't want to start another vim vs emacs holywar. I want to know if there exist an all-in-one IDE (like Eclipse) for Vala. I tried valama, but i

Re: [Vala] Perfect Vala IDE

2014-12-02 Thread Thomas W Olson
I go back and forth between Geany and Anjuta. I like both. Kind Regards, Tom On 12/02/2014 11:59 AM, Dmitry Golovin wrote: Hello all! I don't want to start another vim vs emacs holywar. I want to know if there exist an all-in-one IDE (like Eclipse) for Vala. I tried valama, but it is crash