So the array that is created, is only an array of references? And each reference has no allocated instance? If it were a builtin type instead what would happen? ie, replace Vec with int. (I just tried that, and builtin types work fine).
Is there a way to make a default constructor for this? It seems a little wierd for me to have to new each and every Vec in the array? Certainly a little counter to the way a Type is supposed to be similar to a class. Ie in c++
class Vec {
public:
float x,y,z;
};
class DisPos {
Vec d[255]; <-- no allocations needed when DisPos created
};
This must also mean things like copying user types is a manual process of implementing a copy routine (ala Blitz3d). I had hoped this would have changed. Adds a large amount of extra code, when basic is all about high level code reduction.
Is there a way to make a default constructor for this? It seems a little wierd for me to have to new each and every Vec in the array? Certainly a little counter to the way a Type is supposed to be similar to a class. Ie in c++
class Vec {
public:
float x,y,z;
};
class DisPos {
Vec d[255]; <-- no allocations needed when DisPos created
};
This must also mean things like copying user types is a manual process of implementing a copy routine (ala Blitz3d). I had hoped this would have changed. Adds a large amount of extra code, when basic is all about high level code reduction.