Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: specification
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      Name: dbT83986 Date: 04/13/99


      It would be real cute to be able to mark objects as being
      Immutable (as per Strings). This means that the internal
      state is not permitted to change after creation. This would
      allow extra optimisations at compile time. It would then be
      useful to mark objects as being Primitive objects. Only
      Immutable objects should be allowed to be Primitive. Primitive
      objects would have the property that if a == b, then a.equals(b)
      is also true (ie the object reference is formed from the object's
      internal state such that two objects with the same internal state
      are actually the same object - hence the need for Immutability).

      i.e.
      public interface Immutable {}
      public interface Primitive extends Immutable {}

      Then

      int, long, float, double, short, char, byte, boolean
           are all Primitive
      String
           is Immutable (and should be Primitive).

      You see that Primitive types are the only types that can be
      dealt with properly at compile time. It would also be nice
      to re-introduce the const keyword, marking any object
      instance as immutable (not the class) for things like
      constants and parameters!!!!
      (Review ID: 56888)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                abuckley Alex Buckley
                Reporter:
                dblairsunw Dave Blair (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: