Re: [Vala] Object constructors



"Кутейников Дмитрий"
<kuteynikov gmail com> writes:

   It would be great, if Vala could compile expressions like this:
   var bob = new Person(login="Bob", password="hello",
   email="me gmail com");
   Compiler may replace it with:
   var bob = new Person();
   bob.login = "Bob";
   bob.password = "hello";
   bob.email = "me gmail com";

Actually it looks like:

Person *bob = g_object_new(TYPE_PERSON,
                           "login", "Bob",
                           "password", "hello",
                           "email",
                           "me gmail com",
                           NULL);

Regards
-- 
I've probably left my head... somewhere. Please wait untill I find it.
Homepage (pl_PL): http://uzytkownik.jogger.pl/
(GNU/)Linux User: #425935 (see http://counter.li.org/)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]