Re: [Vala] gtk-examples
- From: Jürg Billeter <j bitron ch>
- To: Kresimir Culin <kculin yahoo com>
- Cc: vala paldo org
- Subject: Re: [Vala] gtk-examples
- Date: Mon, 19 Mar 2007 09:50:33 +0100
On Son, 2007-03-18 at 11:58 -0700, Kresimir Culin wrote:
Hello,
Does anybody work on gtk-examples port to vala ?
If not,and you are interested in that, I can spare
hour or two.
Nobody is working on that, as far as I know; it would be nice to get
some examples how to use GTK+ from within Vala.
I have couple of questions.
Is the code below "the Vala way"?
Particularly I have doubts regarding var keyword.
- when and whether to use it.
- will it be code-completion friendly
- is it just a shortcut to enable typing var instead
of Namespace.Class or some day you will encapsulate
GValue into some Variant type, behind the var keyword
?
Vala is a statically typed language and will remain like that; so it's
just a shortcut, it's not planned to support runtime variant types.
var may be used in variable declarations where the type is obvious but
e.g. you don't want to write the type names - possibly including generic
type arguments - twice when creating a new object instance. I don't
recommend usin var for basic types like int or string.
There is nothing speaking against code completion for var variables, in
principle; it will certainly need a more sophisticated code model but
libvala might be able to provide that.
[example]
Looks quite nice, thanks.
Jürg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]