• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - IDE Dot notation?

F

farginnoob

Guest
Are there any plans to incorporate dot notation in ds_types that would inherently allow/benefit from it?

Ideally, I would like the ability to have a ds_map elements accessible like so:

Code:
var map = ds_map_create()
map.somekey = 5
map.otherkey = "blue"
...because typing map[?"somekey"] every time is slow and annoying.
 
My guess: Don't count on it. It wouldn't be much faster to write + map keys are not variables, and would thus need to be written with "quotes" anyway..
Also, a ds_maps are stored in indexes starting from 0. So are objects. How would GameMaker know that it is map 0 you want to access, and not object 0? :)
 

Perseus

Not Medusa
Forum Staff
Moderator
How would GameMaker know that it is map 0 you want to access, and not object 0?
Once data structures are implemented as true data types (it's already on their roadmap) then that shouldn't be a problem whatsoever. But there could be numerous other reasons as to why YYG might not want to (or be able to) allow dot notation for maps or any other data structure type, for that matter.
 
Top