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
Idea: Strings that happen to be the same as some id property in the data structure can be dereferenced to the object that contains this property. In case of duplicate values, first (or last?) one wins.
Implementation thoughts:
We don’t want to introduce a performance hit if the strings are not dereferenced. That means accessors are out of the question. ES6 Proxies seem like the best way to do it.
array of all properties named id so we don’t have to traverse the entire tree.
The text was updated successfully, but these errors were encountered:
re duplicate ids. besides simple errors, the problem might also arise
if someone makes a wysie linking to several (other peoples'?) files that
aren't "coordinated" and replicate ids unintentionally.
"first mention" seems a fine first heuristic to deal with collisions.
and if someone is working with their own file they can fix it. but if
there are multiple files that the wysie author only reads, here are 2
other potential heuristics:
prioritize the id that is in the same file as the referring object
allow use of filenames as "namespace" or "types" to specify item
locations, e.g. property="people.json:name"
Idea: Strings that happen to be the same as some |id| property in the
data structure can be dereferenced to the object that contains this
property. In case of duplicate values, first (or last?) one wins.
Implementation thoughts:
We don’t want to introduce a performance hit if the strings are
not dereferenced. That means accessors are out of the question.
ES6 Proxies seem like the best way to do it.
array of all properties named |id| so we don’t have to traverse
the entire tree.
As discussed with @karger today.
Idea: Strings that happen to be the same as some
id
property in the data structure can be dereferenced to the object that contains this property. In case of duplicate values, first (or last?) one wins.Implementation thoughts:
id
so we don’t have to traverse the entire tree.The text was updated successfully, but these errors were encountered: