variable vs. immutable

Premises with Uncertainty.

  • 0, each entity may be immutable.
  • 1, a package may be variable.
  • 2, a device could be independently variable.

Rules with Certainty.

  • 0, a programmer should not assume any entity is definitely variable.
  • 1, only package and its descendants may be locally replaced.
  • 2, an independently variable property of a device must be accessed by a function implemented in native code.

Supplements about Local-Replacing.

  • 0, “impl”, “enable” and “disable” will try to apply local-replacing for the package.
  • 1, a class can explicitly provide a Local-Replacing Method, which name should start with a “$”.
  • 2, a LRM is also an instance method.
  • 3, in a LRM, all explicitly This-Calls will try to use corresponding LRMs. – ?
  • 4, in a LRM, all explicitly Base-Calls will try to use corresponding LRMs. – ?
  • 5, in a loop, all explicitly Last-Calls will try to use corresponding LRMs. – ?
  • 6, if a LRM without a normal version of method, the runtime will generate one which works like ‘((this:clone ):$method …)’.
  • 6, if a LRM without a LRM, the runtime will try to call its normal version.