Currently when you create a collection, you get back a handle to this object. I'm not a fan of this, I think it's confusing, and a messy. I would much rather return the collection as an object. In this way you could access functions/features directly as you would in an instance. For example, currently you do something like this...
mylist = ds_list_create(); ds_list_insert(mylist, 1, myvalue ); ds_list_destroy( mylist );
I don't like this. I think even beginners know the concept of an object because they have to deal with instances all the time anyway. So why not....
mylist = ds_list_create(); mylist.insert( 1, myvalue ); mylist.destroy();
This would allow us to do better syntax checking as we know what type the object is, it's not just a number that could actually be used by any number of collections. It should mean (at some point), we could do error checking in the editor and flag up issues where you try and use the list object as an illegal parameter, or try and use it as a grid object etc. Improved intellisense could also prompt you with functions as you type, making it far easier to know what the variable is used for.
However... some people might think this is a step too far for them or beginners.
What do you think? Obviously is people like this, it could open up a WHOLE new approach for GML, so have a good long think about it first....



This topic is locked








