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

Adjust abstracts #78

Merged
merged 5 commits into from
Jan 11, 2023
Merged

Conversation

amartini51
Copy link
Collaborator

@amartini51 amartini51 commented Dec 5, 2022

Fixes rdar://102988487
Fixes rdar://102988514
Fixes rdar://102995541
Fixes rdar://103188927

Listing everything in the abstract would get too long to really be
useful for the reader.  Instead of trying to add what's omitted
(conditional operator, range operators, nil-coalescing operator, maybe
others) make it clear that these are examples.
Copy link
Member

@krilnon krilnon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a reasonable change. If I had to gripe, it'd be that you can nest types inside of other types regardless of whether they're specifically data types.

@amartini51
Copy link
Collaborator Author

you can nest types inside of other types regardless of whether they're specifically data types

Oh, interesting — I think I treat "type" and "data type" as synonyms. Would a non-data type be something like an enum with no cases, used to create a pseudo-namespace?

Looking at usage within TSPL, "data types" is actually pretty rare, so it might be worth changing those to just "types" to be more consistent:

% git grep 'data type'
LanguageGuide/AdvancedOperators.md:You can use bit shifting to encode and decode values within other data types:
LanguageGuide/ClassesAndStructures.md:In practice, this means most of the custom data types you define
LanguageGuide/NestedTypes.md:Define one data type inside of another data type.
LanguageGuide/Properties.md:can return an instance of some other data type,

@krilnon
Copy link
Member

krilnon commented Dec 7, 2022

Would a non-data type be something like an enum with no cases, used to create a pseudo-namespace?

Yeah, or any type that doesn't have storage requirements, like a protocol that defined methods and accessor functions. In contrast to something like a Point, where most of the purpose of the type is to store data.

The term "data type" is rare in the book to begin with.  I've left a
couple places where it refers to a type that stores some kind of data.
But in most places (as pointed out by Kyle during review of this PR)
we're talking about both types that do and don't have storage.
The words "structure" and "groups" can both be read as either a noun or
a verb, which makes this sentence hard to parse.  This fact that we use
"structure" as a noun a lot throughout the book to refer to structs
exacerbates that misreading.

Fixes rdar://103188927
@amartini51
Copy link
Collaborator Author

@krilnon I've changed "data type" here and in a couple other places in e19bb77.

@amartini51 amartini51 merged commit d14f2a8 into apple:main Jan 11, 2023
@amartini51 amartini51 deleted the abstracts_102988487_102988514 branch February 27, 2023 19:07
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.

None yet

2 participants