Quote: "The issue comes down to space allocation for arrays. It is based on allocating enough space for <dimsize> * <UDT size>. If you add arrays inside the UDT, then the calculation gets trickier. Especially if you assume that the arrays within the UDTs should be redimensionable like normal arrays."
Couldn't you just have a UDT variable be a pointer to another array? So technically it would just create another array separately but hides that effect from the user.
So where the user sees this kind of functionality:
type Thing
stuff[10] as integer
endtype
dim things[5] as Thing
things[3].stuff[2] = 42
Internally it would look more like this (or something):
type Thing
stuff as integer
endtype
size = 5
stuffSize = 10
dim things[size] as Thing
for i = 0 to size-1
things[i+1].stuff = i*stuffSize + 1
next i
dim ints[size*stuffSize] as integer
ints[ things[3].stuff +3 ] = 42
I know it would probably be tricky, simply based on the conversations I remember in the past about trying to add this to DB.