Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Object-Oriented Swift 2.0 Classes Recap: Classes

Phillip Paik
Phillip Paik
7,450 Points

What does this mean: "Instance methods should be narrow in scope and carry out a single task".

What does the "narrow" mean in this case?

I'm thinking this is talking about the "init" correct?

1 Answer

Hi Phillip!

What this means is that the scope of the method should be limited so it doesn't get too big. If the method isn't narrow then it may end up doing more than the one thing it is supposed to and get quite complex.

I hope that I managed to help you out! If you need any more help then don't hesitate to ask.

-Luke