Is it possible to create a mixed array in vala? -
in vala see when declare array have specify type, like
int[] myarray = { 1, 2, 3 }; i wonder if there way have mixed array like
smtg[] myarray = { 1, 'two', 3 }; i see in this question in c++ , c# it's not possible started learning vala , have no background c-like language want sure.
no.
that said, can create array of can hold other types, glib.value or glib.variant, , vala can automatically convert to/from two, like
glib.value[] values = { 1, "two", 3.0 } it's terrible idea (you're throwing away compile time type safety), can it.
Comments
Post a Comment