The Problem
The introduction of pointers has been a game-changer, enabling us to create code that is more efficient and much cleaner. But there are some noticeable gaps when it comes to fully harnessing the power of pointers, particularly when we're referring to built in variables.
The issue? That Dream Seeker will not automatically dereference a pointer for built-in variables. So for now example, if I wanted to link the plane variable for a list of atoms, I couldn't use pointers to do so ultimately because a plane must resolve into an integer. So pointing to an integer value is futile as the variable would only have access to the memory location, not the value itself.
The Solution(s)
1) Automatic Dereferencing
When Dream Seeker attempts to access a built-in variable for use, it should first check to see what type of value the variable is using. If the variable contains a memory address, Dream Seeker should automatically dereference the pointer to access the value that is being pointed to! This will enable lots of neat (and efficient) tricks for BYOND developers.
2) auto_deref flag
Maybe people would prefer not to use this functionality? In that case, there should be a flag that could be modified to enable these feature per atom?
Alternatively, have this flag be turned off by default. And you'll need to modify it in order to have variables automatically dereferenced when acessed by dream seeker.
Potential Issues
I still need to experiment with pointers a bit more. I have no idea how they may respond to special containers, like contents, overlays, underlays, etc. Which internally are much different than the other lists that BYOND has access too. Honestly, some insight on this would be dope.
ID:2910243
![]() Jan 28, 3:00 pm
|
|||||||
Not Feasible
| |||||||
![]() Jan 28, 3:14 pm
|
|
Lummox JR resolved issue (Not Feasible)
|