Skip to content

Corrected tuple definition #1728

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

Closed
wants to merge 1 commit into from

Conversation

manishbansal8843
Copy link
Contributor

Earlier statement was more ambiguous for a beginner.

Earlier statement was more ambiguous for a beginner.
@SethTisue
Copy link
Member

I don't see how this is an improvement. Perhaps we can find some other way to improve it. What was the issue here that you saw?

@manishbansal8843
Copy link
Contributor Author

@SethTisue I feel the definition is bit ambiguous for a newcomer. The current definition somehow gives an impression that scala tupple only accepts distinct data type. It would be better if we add same or distinct data type. If you have any other suggestion, do let me know.

@SethTisue
Copy link
Member

SethTisue commented Jul 7, 2020

The problem I have with "same or distinct" is that in the overwhelming majority of cases, the types will be different. The case where all the types happen to be the same isn't common at all. Whereas phrasing it as "same or distinct" gives the impression that "same" is normal and expected, and that "distinct" is the alternative.

@manishbansal8843
Copy link
Contributor Author

Even though the majority use case will be for distinct types, I somehow feels documentation should be comprehensive. If you want, we can make it as distinct or same to emphasize on the distinct part.

@SethTisue
Copy link
Member

I don't think "distinct or same" is clear, idiomatic English. It muddies the question rather than clarifying it.

Maybe some entirely different phrasing such as "each with its own type"?

@manishbansal8843
Copy link
Contributor Author

How about this.

In Scala, a tuple is a value that contains a fixed number of homogeneous or heterogeneous types of elements. Tuples are immutable.

Or we could remove the phrase all together to avoid ambiguity.

In Scala, a tuple is a value that contains a fixed number of elements. Tuples are immutable.

@SethTisue
Copy link
Member

SethTisue commented Sep 1, 2020

Or we could remove the phrase all together

The fact that the elements have individual types is one of the most crucial, important pieces of information on the entire page. Omitting it wouldn't make sense.

"Homogeneous" and "heterogeneous" are big, obscure words — I don't think they improve the clarity.

@SethTisue SethTisue changed the title Corrected tupple definition Corrected tuple definition Sep 1, 2020
@SethTisue
Copy link
Member

I have one more idea: replace "each with a distinct type" with "each with its own type"?

@manishbansal8843
Copy link
Contributor Author

"Homogeneous" and "heterogeneous" are big, obscure words — I don't think they improve the clarity

I was referring this document for using these keywords. And same also needs to be updated i believe with the keyword "homogeneous".

@SethTisue
Copy link
Member

I was referring this document for using these keywords

I don't like it there either :-)

SethTisue added a commit that referenced this pull request Sep 16, 2020
@SethTisue
Copy link
Member

I went with "each with its own type" in 70a1166

@SethTisue SethTisue closed this Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants