What's the word for "Enable/Disable"?

Naming ConventionsTerminology

Naming Conventions Problem Overview


When I want to comment code about control Enable/Disable and when I want to discuss with people about the control Enable/Disable, I really hope there is actually a word to it instead of typing or saying "Enable/Disable".

Currently I use the word EnDisable, what is the real word of it?

Naming Conventions Solutions


Solution 1 - Naming Conventions

I would suggest using "toggle" as although it doesn't exactly mean Enable/Disable it is commonly used as such in the context of user interfaces (as @Pekka mentioned).

Solution 2 - Naming Conventions

Really depends on the context.

  • Changing of a control's status?
  • Switch?
  • Change?

Update: @Yacoby has the perfect one, it's widely used in user interface contexts.

Solution 3 - Naming Conventions

I use "Ability", because if something is "enabled", it is "able to", and if it's "disabled" it is "unable to", so "ability" works for me and it's quite understandable. To switch the parameter I name my function "setAbility".

Solution 4 - Naming Conventions

If I'm writing functions that enable or disable something depending some other data, I usually call them "ToggleXXX".

Solution 5 - Naming Conventions

Depends on the context. If you are referring to a life-support system, 'Kill' probably.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionLedView Question on Stackoverflow
Solution 1 - Naming ConventionsYacobyView Answer on Stackoverflow
Solution 2 - Naming ConventionsPekkaView Answer on Stackoverflow
Solution 3 - Naming ConventionsWojtekView Answer on Stackoverflow
Solution 4 - Naming ConventionsOliver FriedrichView Answer on Stackoverflow
Solution 5 - Naming ConventionsRob KentView Answer on Stackoverflow