Possible rewording in Map's Set-method.

Share your ideas as to how the documentation can be improved.
safetycar
Posts: 435
Joined: 12 Aug 2017, 04:27

Possible rewording in Map's Set-method.

Post by safetycar » 02 Jun 2021, 11:38

Coming from this other thread:
https://www.autohotkey.com/boards/viewtopic.php?p=403046#p403046

In the documentation there is this explanation about the Map's Set-method:
This is equivalent to setting each item with MapObj[Key] := Value, except that __Item is not called and Capacity is automatically adjusted to avoid expanding multiple times during a single call.
Which I thought it could look kmore clear if reworded like:
This can be similar to a bulk operation of setting items with MapObj[Key] := Value, but saves by adjusting Capacity automatically instead of expanding it multiple times.
Also relevant for cases were calling __Item wants to be avoided.
Doesn't have to be exactly like that but I think it needs a change to help avoid confusion for users with lower knowledge.

Return to “Suggestions on Documentation Improvements”