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

Erik Haake
Erik Haake
15,960 Points

Naming of method at 3:14 in video Prepositional vs Grammatical Phrases

I'm still a bit confused as to the rationale for the naming of said method:

func move(toPosition position: Int)

It seems to me that it would make more sense if the method was named

func moveTo(position: Int) 

since it is clear to me that you would pass in an array index as an Int value (coming from C, C++).

Is it because Int is a fundamental type and therefore doesn't give enough contextual information as to the purpose of the argument? What if the argument type was IndexPath?