Skip to content

AV1720 Name methods using verb-object pair #19

@ygoe

Description

@ygoe

Or just a verb. In OOP, methods are often operations on the instance. They are actions that the object can perform. Tell a socket to Close, or a file to Delete itself, or a collection to Clear. (See also AV1710: Don't repeat the name of a class (...) in its members) Of course the 'object' part (as in verb-object) is helpful if it's not clear from the context what thing a method will work on.

I know that PowerShell cmdlets suggest a Verb-Object naming but there's often no instance that the command applies to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions