You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on #5020 and in order to minimise the amount of changes, an index argument has been added to some of the methods related to attributes reading/writing.
The goal of this argument is to address a particular element of the attribute. At the moment it is represented as an int32 where -1 represents read/write all the List, 0 represents read/write the actual number of elements in this list, and n read/write the nth element of the list.
Because of this actual element indexing starts at 1. There should be a better way to express that.
Follow is Boris comment, asking for a followup.
Please document the semantics of this "index" arg and why we're adding "1" to it. The fact that -1 becomes "read or write the length" and non-negative values become entry writes is extremely non-obvious.
In terms of naming, readWritePartOfListAttribute (and similar for the separate writeAttribute/readAttribute methods) might be closer to what this thing really does. And document really carefully, then file a followup to have a sane way of doing this. :( Will need some surgery on the ember stuff.
@bzbarsky-apple bzbarsky-apple on Apr 8, 2021
Please document the semantics of this "index" arg and why we're adding "1" to it. The fact that -1 becomes "read or write the length" and non-negative values become entry writes is extremely non-obvious.
In terms of naming, readWritePartOfListAttribute (and similar for the separate writeAttribute/readAttribute methods) might be closer to what this thing really does. And document really carefully, then file a followup to have a sane way of doing this. :( Will need some surgery on the ember stuff.
Author @vivien-apple vivien-apple on Apr 9, 2021
#5896
Older issue. The referenced code no longer calls emAfReadOrWriteAttribute.
Marking stale to be closed after validation by author or reviewer.
Removing tag v1_triage_split_4
While working on #5020 and in order to minimise the amount of changes, an
index
argument has been added to some of the methods related to attributes reading/writing.The goal of this argument is to address a particular element of the attribute. At the moment it is represented as an
int32
where-1
represents read/write all theList
,0
represents read/write the actual number of elements in this list, andn
read/write the nth element of the list.Because of this actual element indexing starts at
1
. There should be a better way to express that.Follow is Boris comment, asking for a followup.
Please document the semantics of this "index" arg and why we're adding "1" to it. The fact that -1 becomes "read or write the length" and non-negative values become entry writes is extremely non-obvious.
In terms of naming, readWritePartOfListAttribute (and similar for the separate writeAttribute/readAttribute methods) might be closer to what this thing really does. And document really carefully, then file a followup to have a sane way of doing this. :( Will need some surgery on the ember stuff.
Originally posted by @bzbarsky-apple in #5020 (comment)
The text was updated successfully, but these errors were encountered: