struct Data
static method operator [] takes integer i returns Data
return Data(i)
endmethod
endstruct
Very. End code bloat, prevent people from misusing your struct by calling allocate. Allows your custom allocation. It is not an ugly hack. No crazy typecasts involved. Etc, etc.So basically extends array just makes you able to use [] instead of (). How useful is that. <_<
Viikuna said:I use them in my DayNightFog system, and they work pretty nicely