On Mon, 2013-12-09 at 18:19 +0100, pancake wrote:
> I have been doing some bindings for Vala and noticed something inconsistent 
> in the naming of enums.
> 
>  // VALID
> enum Foo {
>    1FOO
> }
> 
> // INVALID
> enum Bar {
>    33
> }
> 
> The thing is that you can name an enum like Foo.1FOO, but not Bar.33,
> if the reason to support enums prefixed with a number is because the C
> translation doesnt breaks anything.. why do using numeric values
> breaks?
> 
> Is this defined by the Vala language or it’s just a bug?

Refusing to accept 33 is not a bug.  Accepting 1FOO might be.

You can use

        public enum Bar {
          @33
        }


-Evan

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to