- Joined
- Dec 1, 2007
- Messages
- 38,987
- Likes received
- 2,910
- Thanks received
- 678
- Location
- My house
Splitting bits of a large public method into several private methods just to make the method smaller... well I can see your point here although if there are distinct sub-functions I would probably consider it when the method got too long.I very rarely ever write private methods and in fact I would have them banned, I cant see the point of splitting up a large public method into smaller private methods. It does make the readability of the code much worse as you have to use the IDE then to follow the code looking for calls rather than moving down one large method.
BUT, typically these private methods are bits of functionality used by more than one public method, but not safe to call directly from outside the class.
Are you from a C background?