Skip to main content
added 139 characters in body
Source Link
Kris
  • 304
  • 1
  • 7

Clearly the prefix and suffix are almost obvious choices for different types of actions or rather, different directions of an action.

Current usage and preferences may be inconsistent due to many reasons, though.

CanShootAction is performed by the object:
CanShoot --> It shoots (at) something
CanFly --> It flies
CanChange --> It changes

ReadableAction is performed on the object:
Readable --> You can read it
Writable --> You can write (to) it
Printable --> You can print it

While it may not be a rule or even necessarily logical, it helps to adopt the convention and maintain consistency of use in variable naming.

Clearly the prefix and suffix are almost obvious choices for different types of actions.

Current usage and preferences may be inconsistent due to many reasons, though.

CanShoot --> It shoots (at) something
CanFly --> It flies
CanChange --> It changes

Readable --> You can read it
Writable --> You can write (to) it
Printable --> You can print it

While it may not be a rule or even necessarily logical, it helps to adopt the convention and maintain consistency of use in variable naming.

Clearly the prefix and suffix are almost obvious choices for different types of actions or rather, different directions of an action.

Current usage and preferences may be inconsistent due to many reasons, though.

Action is performed by the object:
CanShoot --> It shoots (at) something
CanFly --> It flies
CanChange --> It changes

Action is performed on the object:
Readable --> You can read it
Writable --> You can write (to) it
Printable --> You can print it

While it may not be a rule or even necessarily logical, it helps to adopt the convention and maintain consistency of use in variable naming.

added 24 characters in body
Source Link
Kris
  • 304
  • 1
  • 7

Clearly the prefix and suffix are almost obvious choices for different types of actions.

Current usage and preferences may be inconsistent due to many reasons, though.

CanShoot --> It shoots (at) something
CanFly --> It flies
CanChange --> It changes

Readable --> You can read it
Writable --> You can write (to) it
Printable --> You can print it

While it may not be a rule or even necessarily logical, it helps to adopt the convention and maintain consistency of use in variable naming.

Clearly the prefix and suffix are almost obvious choices for different types of actions.

Current usage and preferences may be inconsistent due to many reasons, though.

CanShoot It shoots (at) something
CanFly It flies
CanChange It changes

Readable You can read it
Writable You can write (to) it
Printable You can print it

While it may not be a rule or even necessarily logical, it helps to adopt the convention and maintain consistency of use in variable naming.

Clearly the prefix and suffix are almost obvious choices for different types of actions.

Current usage and preferences may be inconsistent due to many reasons, though.

CanShoot --> It shoots (at) something
CanFly --> It flies
CanChange --> It changes

Readable --> You can read it
Writable --> You can write (to) it
Printable --> You can print it

While it may not be a rule or even necessarily logical, it helps to adopt the convention and maintain consistency of use in variable naming.

Source Link
Kris
  • 304
  • 1
  • 7

Clearly the prefix and suffix are almost obvious choices for different types of actions.

Current usage and preferences may be inconsistent due to many reasons, though.

CanShoot It shoots (at) something
CanFly It flies
CanChange It changes

Readable You can read it
Writable You can write (to) it
Printable You can print it

While it may not be a rule or even necessarily logical, it helps to adopt the convention and maintain consistency of use in variable naming.