Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change how we use the term "element" #2631

Open
kwalrath opened this issue Sep 10, 2020 · 6 comments · Fixed by #2638
Open

Change how we use the term "element" #2631

kwalrath opened this issue Sep 10, 2020 · 6 comments · Fixed by #2638
Labels
a.language Relates to the Dart language tour act.question Relates to issues that writers need SME help e1-hours Can complete in < 8 hours of normal, not dedicated, work fix.quality Needs improvement in copy quality p2-medium Necessary but not urgent concern. Resolve when possible. st.triage.ltw Indicates Lead Tech Writer has triaged

Comments

@kwalrath
Copy link
Contributor

kwalrath commented Sep 10, 2020

This came up in a discussion with @johnpryan and @munificent.

"Element" is overloaded to mean "a syntactic construct that can appear inside a collection literal" and "a value that can appear in a collection object". The former is evaluated at runtime and may produce zero or more of the latter.

UI-as-code features like collection if, collection for, and spread are elements in the former sense, but not in the latter.

We should probably move away from using "element" to mean a value in a list object. We can already use "value" or "object" to refer to that and those are clearly runtime terms. So elementAt() returns a value, not an "element" (despite the name).

This affects the language tour and anywhere else that uses the term "element" (up to 34 pages, but some of those probably refer to HTML elements).

@kwalrath kwalrath added e1-hours Can complete in < 8 hours of normal, not dedicated, work e2-days Can complete in < 5 days of normal, not dedicated, work a.language Relates to the Dart language tour p2-medium Necessary but not urgent concern. Resolve when possible. docs labels Sep 10, 2020
@Aman9026
Copy link
Contributor

@kwalrath The writers have used "element" at two places which caught my attention:

  • In examples having "halogens", if we go with that context, elements would be possibly referring to "chemical elements"

  • In examples of "list", this is ambiguous and needs to be fixed

@kwalrath
Copy link
Contributor Author

#2638 fixed this in the language tour, but we need to make a sweep through other uses.

@kwalrath kwalrath self-assigned this Feb 6, 2021
@atsansone
Copy link
Contributor

element appears 541 results in 40 files. Should be a straightforward edit.

@atsansone atsansone added fix.quality Needs improvement in copy quality and removed e2-days Can complete in < 5 days of normal, not dedicated, work labels Apr 12, 2023
@atsansone atsansone self-assigned this Apr 12, 2023
@atsansone atsansone added the st.triage.ltw Indicates Lead Tech Writer has triaged label Apr 12, 2023
@atsansone
Copy link
Contributor

@munificent : This inconsistency exists as to how we refer to the items in collection structures. This issue wants to move toward using value whenever we are talking about list, map, or set contents. The spec uses element when talking about control flow structures / literals. Do you have guidance as to which would be the best term, even if different terms should be used in different circumstances?

Current terms under consideration are value (used in language tour only, but also in Python), element (used almost everywhere else, but also in Java and Scala), or item.

@atsansone atsansone added the act.question Relates to issues that writers need SME help label Apr 12, 2023
@munificent
Copy link
Member

I'd probably use "value" when referring to the thing you can get out of a list or set, and "entry" for the key-value pairs a map contains.

I do have to say that "element" feels pretty natural to me to refer to the runtime concept of a value returned from a list, and it's a shame that I overloaded the term to mean the syntactic construct. I was never able to come up with a better name for "the kind of thing you can write inside a collection literal".

@johnpryan
Copy link
Contributor

I don't remember the context here, but "element" is also okay with me after reading through this issue three years later.

@atsansone atsansone removed the docs label Jun 28, 2023
@atsansone atsansone removed their assignment Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a.language Relates to the Dart language tour act.question Relates to issues that writers need SME help e1-hours Can complete in < 8 hours of normal, not dedicated, work fix.quality Needs improvement in copy quality p2-medium Necessary but not urgent concern. Resolve when possible. st.triage.ltw Indicates Lead Tech Writer has triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants