Anyone can comment on what they deem correct. The users are especially important. They are the one who use the product after all.
There are general consensus about what is 'correct' when it comes to things like language design.
Not always possible and Seperation of concerns is also quite important.
I like making frameworks, and things. I dont always know what the user does.
What if the asset is the one doing the freeing, without the user knowing? (like surfaces get freed).
Then the user doent know when to free, and the asset doesnt know what variables to set to 'undefined'.
here, the only way around this is to supply a callback script so the user can then set all his varibles to undefined. But come on... really?
There is a general rule in computer science: separation of concerns.
Now, needing to keep track of every variable referencing a data structure, and setting them to 'undefined' when i free a data structure, thats hardly sepearating concerns.
Whats more, that can be increadibly ineficient! What if i have a grid, that stores lists. The same list can referenced mutiple times in the grid.
If i free a list, i would have to itterate through every cell in the grid, checking to see if that list is the one being freed in order to set it to undefined? Bollocks to that!
Regardless, what use is ds_exists if i dont know if im talking about the ds i created at the start of the game, or the ds i just created now.
Well, actually, you are asking: "does a data structure of this type, with this index exists?"
But, it would be better to have: "Does the data structure with this index exist?" ie: has it been created? has it been destroyed. Nice and specific about 1 data structure you got a handle of before.
Not any data structure that, through sheer luck, got the same index as the one you created before.
Isnt it great computer science is all about virtualization these days: Even in C you dont use physical memory.
What we get is an id to refference DS' with. Not and address.
But, because it is reused, we get al the dissadvantages of an address, with none of the advantages. Great