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

Pluralization of code objects #9

Open
crispy8888 opened this issue Aug 21, 2015 · 4 comments
Open

Pluralization of code objects #9

crispy8888 opened this issue Aug 21, 2015 · 4 comments

Comments

@crispy8888
Copy link
Contributor

I don't think I've seen this covered elsewhere, but the question is straightforward:

Should we refer to multiple UIThing objects as:

UIThings ...or... UIThings?

The former is technically more correct but the latter looks and reads a lot better. Your thoughts, contributors?

@greystar93
Copy link
Contributor

@crispy8888 Chris LP and I independently decided awhile back during one of the books that it should be UIThings, and that's what I've done since then. But it does always stick out in copy and bug me.

Here's what Apple says:

Code font in text
[...]
Don’t mix fonts within a single word. Rewrite to avoid forming the plural of a word in code font.
Correct: values of type integer
Incorrect: integers

Of course, Apple says to do many things that we don't do, like put variables in text in italics. But this advice does seem sound to me. Though, probably it's a rare reader who cares if UIThings is technically incorrect.

Let's ask @gregheo, @wlinc and @rwenderlich what they think.

@gregheo
Copy link

gregheo commented Aug 22, 2015

I hate the look of UIThings. While it looks particularly horrible here on GitHub issues, it's not too bad on the site and books.

It's extra wordy, but I try to write "UIThing objects" or "Int values" or "NSWhatever instances" as appropriate. I'm not always consistent at editing these out but I do it sometimes.

Some authors like to name types a lot, which means you run into this plural thing a lot:

In your UIViewControllers it's important to have references to other UIViewControllers to then draw to their UIViews inside all of their frames.

Personally, I think too many shifts to code style is distracting. A UITableView is a "table view" and unless spelling out the exact class name is important, I'd rather write "table view".

In your UIViewController objects, it's important to have references to other view controllers to then draw to their views inside their frames.

@ceo-nada
Copy link

Agree with the sentiment that it looks odd, and I think it looks odd no matter the medium. Hence, I typically edit "pluralized" code out through strategic rewording for the sake of clarity, and so as not to assault the readers' eyes. (Or at least mine.)

I wish I knew when things are objects, values and instances, but I suppose I could make an educated guess and flag it with a TODO for the FPE. Would that be a process we could all agree upon?

Sent from my iPad

On Aug 21, 2015, at 5:48 PM, Greg Heo [email protected] wrote:

I hate the look of UIThings. While it looks particularly horrible here on GitHub issues, it's not too bad on the site and books.

It's extra wordy, but I try to write "UIThing objects" or "Int values" or "NSWhatever instances" as appropriate. I'm not always consistent at editing these out but I do it sometimes.

Some authors like to name types a lot, which means you run into this plural thing a lot:

In your UIViewControllers it's important to have references to other UIViewControllers to then draw to their UIViews inside all of their frames.

Personally, I think too many shifts to code style is distracting. A UITableView is a "table view" and unless the spelling out the exact class name is important, I'd rather write "table view".

In your UIViewController objects, it's important to have references to other view controllers to then draw to their views inside their frames.


Reply to this email directly or view it on GitHub.

@greystar93
Copy link
Contributor

I could definitely agree with that process. If we're not sure how to rearrange, leave a TO-DO. We can also ask tech editors to keep an eye out for this.

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

No branches or pull requests

4 participants