Skip to content

Remove Need for Method Prototypes within a Source File in Objective-C #11585

@llvmbot

Description

@llvmbot
Bugzilla Link 11213
Resolution INVALID
Resolved on Oct 24, 2011 13:49
Version unspecified
OS All
Reporter LLVM Bugzilla Contributor

Extended Description

This is a proposal for dropping the need for method prototypes within one .m file.
The whole file could be parsed for getting all method declarations from their definitions first.

Reasons:

  1. It takes extra time to write prototypes, and more have to be added if method order is changed.

  2. These prototypes are more of visual noise and bloat the file.

  3. The prototypes need updates too when the method signature changes.

  4. Following some code guidelines (e.g. the ones in "Clean Code"), it is advised to write methods from top to bottom more and more concrete, and thus a method should preferably call lower-level methods from below. This asks for prototypes for nearly all methods.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions