Skip to main content
Code Review

Return to Answer

added 9 characters in body
Source Link

Have a look at TableView's datasource protocol:

– tableView:cellForRowAtIndexPath:
– numberOfSectionsInTableView:
– tableView:numberOfRowsInSection:
– sectionIndexTitlesForTableView:

I find it quite hard to come up with nice names for such sidle parameter method signature and code completion would be easier, if the form, you propose would exists, but if a method accepts parameters, it name must terminate with one of therm — if it just have one, it must be at the end.

Your idea of adding a dead parameter is IMO very bad design. Another parameter should lead possibly to a noteranother behavior. Also idit would work againsagainst objective-c strength of self explaining method name. countOfSubscribersForNewsEmitter:(MyNewsEmitter *)emitter make sense, while newsEmitter:(MyNewsEmitter *)emitter countOfSubscribers:(BOOL) aBool does not make much sense, as the bool disallows us to form a correct mental model of the purpose of this method.

Have a look at TableView's datasource protocol:

– tableView:cellForRowAtIndexPath:
– numberOfSectionsInTableView:
– tableView:numberOfRowsInSection:
– sectionIndexTitlesForTableView:

I find it quite hard to come up with nice names for such sidle parameter method signature and code completion would be easier, if the form, you propose would exists, but if a method accepts parameters, it name must terminate with one of therm — if it just have one, it must be at the end.

Your idea of adding a dead parameter is IMO very bad design. Another parameter should lead possibly to a noter behavior. Also id would work agains objective-c strength of self explaining method name. countOfSubscribersForNewsEmitter:(MyNewsEmitter *)emitter make sense, while newsEmitter:(MyNewsEmitter *)emitter countOfSubscribers:(BOOL) aBool does not make much sense, as the bool disallows us to form a mental model of the purpose of this method.

Have a look at TableView's datasource protocol:

– tableView:cellForRowAtIndexPath:
– numberOfSectionsInTableView:
– tableView:numberOfRowsInSection:
– sectionIndexTitlesForTableView:

I find it quite hard to come up with nice names for such sidle parameter method signature and code completion would be easier, if the form, you propose would exists, but if a method accepts parameters, it name must terminate with one of therm — if it just have one, it must be at the end.

Your idea of adding a dead parameter is IMO very bad design. Another parameter should lead possibly to another behavior. Also it would work against objective-c strength of self explaining method name. countOfSubscribersForNewsEmitter:(MyNewsEmitter *)emitter make sense, while newsEmitter:(MyNewsEmitter *)emitter countOfSubscribers:(BOOL) aBool does not make much sense, as the bool disallows us to form a correct mental model of the purpose of this method.

added 459 characters in body
Source Link

Have a look at TableView's datasource protocol:

– tableView:cellForRowAtIndexPath:
– numberOfSectionsInTableView:
– tableView:numberOfRowsInSection:
– sectionIndexTitlesForTableView:

I find it quite hard to come up with nice names for such sidle parameter method signature and code completion would be easier, if the form, you propose would exists, but if a method accepts parameters, it name must terminate with one of therm — if it just have one, it must be at the end.

Your idea of adding a dead parameter is IMO very bad design. Another parameter should lead possibly to a noter behavior. Also id would work agains objective-c strength of self explaining method name. countOfSubscribersForNewsEmitter:(MyNewsEmitter *)emitter make sense, while newsEmitter:(MyNewsEmitter *)emitter countOfSubscribers:(BOOL) aBool does not make much sense, as the bool disallows us to form a mental model of the purpose of this method.

Have a look at TableView's datasource protocol:

– tableView:cellForRowAtIndexPath:
– numberOfSectionsInTableView:
– tableView:numberOfRowsInSection:
– sectionIndexTitlesForTableView:

I find it quite hard to come up with nice names for such sidle parameter method signature and code completion would be easier, if the form, you propose would exists, but if a method accepts parameters, it name must terminate with one of therm — if it just have one, it must be at the end.

Have a look at TableView's datasource protocol:

– tableView:cellForRowAtIndexPath:
– numberOfSectionsInTableView:
– tableView:numberOfRowsInSection:
– sectionIndexTitlesForTableView:

I find it quite hard to come up with nice names for such sidle parameter method signature and code completion would be easier, if the form, you propose would exists, but if a method accepts parameters, it name must terminate with one of therm — if it just have one, it must be at the end.

Your idea of adding a dead parameter is IMO very bad design. Another parameter should lead possibly to a noter behavior. Also id would work agains objective-c strength of self explaining method name. countOfSubscribersForNewsEmitter:(MyNewsEmitter *)emitter make sense, while newsEmitter:(MyNewsEmitter *)emitter countOfSubscribers:(BOOL) aBool does not make much sense, as the bool disallows us to form a mental model of the purpose of this method.

Source Link

Have a look at TableView's datasource protocol:

– tableView:cellForRowAtIndexPath:
– numberOfSectionsInTableView:
– tableView:numberOfRowsInSection:
– sectionIndexTitlesForTableView:

I find it quite hard to come up with nice names for such sidle parameter method signature and code completion would be easier, if the form, you propose would exists, but if a method accepts parameters, it name must terminate with one of therm — if it just have one, it must be at the end.

lang-c

AltStyle によって変換されたページ (->オリジナル) /