kodecocodes / swift-style-guide

The official Swift style guide for Kodeco.
Other
13.11k stars 2.15k forks source link

MARK missing end dash #78

Closed grosch closed 9 years ago

grosch commented 9 years ago

You kinda sorta implemented my MARK suggestion. For the ones that go above an extension, I think it's important to have the trailing - as well. If you just do a leading dash, it really looks no different than a comment in the main class, and is hard to read. Having the trailing dash adds that trailing line, and really calls it out as a separate section in the drop-down.

Did you intentionally leave it out?

gregheo commented 9 years ago

I left a comment in the issue, but it seems to have gotten lost when I changed it to a pull request.

From other tutorials on our site, the usual style is to have the horizontal line, then the header text, and then the methods. So the methods are included "inside the lines" so to speak:

screen shot 2014-12-22 at 3 55 22 pm

The leading dash definitely does make a difference – without it I agree that it all sort of meshes together.

To my eye though, both a leading and trailing line make the title "UITableViewDelegate" look separate from the methods, as if "UITableViewDelegate" is a thing, and then the methods following are a separate thing.

screen shot 2014-12-22 at 3 55 41 pm

More comments are welcome, of course!

ColinEberhardt commented 9 years ago

I vote leading dash only :-)

hollance commented 9 years ago

+1 for leading dash only.

gregheo commented 9 years ago

If there are silent supporters of the trailing dash, they're not here ;]. We'll stick with this as-is, as it matches the previous Objective-C style for the jump bar too.