Oh, interesting! I updated the page, hope this is correct:

https://wiki.gnome.org/action/info/Vala/Tutorial?action=diff&rev2=242&rev1=241

I also noticed that doing this as a top-level function, i.e naming a
function outside any class or namespace something beginning with a
digit, generates faulty C code. This should be reported as a valac
bug, right? What would be the least surprising behavior, that valac
renames the function (adding some prefix) or to disallow this?  Same
thing with keywords, this passes valac:

void @if () {
}

Regards, Simon

On Fri, Oct 11, 2013 at 5:58 PM, Florian Brosch <flo.bro...@gmail.com> wrote:
> Hey Simon,
>
> The overview is outdated:
>
> public class Foo : Object {
>     // Identifier = "0foo"
>     public string @0foo {get;set;}
> }
>
> Regards,
>  Florian
>
> On 11 October 2013 10:46, Simon Kågedal Reimer <skage...@gmail.com> wrote:
>>  Hi,
>>
>> On Fri, Oct 11, 2013 at 9:34 AM, Tal Hadad <tal...@hotmail.com> wrote:
>>> First time I hear not all properties are GObject.
>>>
>>> Suppose I have this property:
>>>
>>> ...
>>> public int 1numbered { get; set; }
>>> ...
>>>
>>> This is not a GObject property, since it's started with a number.
>>
>> You can't have that at all, see
>> https://wiki.gnome.org/Vala/Tutorial#Syntax_Overview :
>>
>> "For identifier names the same rules apply as for C identifiers: the
>> first character must be one of [a-z], [A-Z] or an underscore,
>> subsequent characters may additionally be digits [0-9]."
>>
>> Signal names also must start with a letter:
>>
>> https://developer.gnome.org/gobject/stable/gobject-Signals.html#g-signal-new
>>
>> Regards, Simon
>> _______________________________________________
>> vala-list mailing list
>> vala-list@gnome.org
>> https://mail.gnome.org/mailman/listinfo/vala-list
_______________________________________________
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to