[Vala] Minor features request (about structs and enums)



I think Vala is missing some minor features related to type declarations
(such as structs and enums) that both C and C++ have and are really
useful.

For example, if you are to declare a single struct in C or C++, you can
just do:
-----------
struct {
        int id;
        float mass;
} Object;
------------
In Vala, you cannot (as far as I know by experimentation.

Such is the example with the enum:
------------
enum {
        CONSTRUCT
        RUN
        DESTROY
} Process;
------------
Again, Vala does not support this kind of declaration.

Another feature that might be out of context, and I don't know if its
implemented but nor Google nor the people at the IRC channel have been
able to answer me, is enum iteration.

foreach ((what type?) item in MyEnum) { ... }

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



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