txt: ## valueobjat.md
  class ValueObjAt
  
  Unique identification for value types
  
  ```raku
  class ValueObjAt is ObjAt { }
  ```
  
  A subclass of [`ObjAt`](/type/ObjAt) that should be used to indicate that a class produces objects that are value types - in other words, that are immutable after they have been initialized.
  
  ```raku
  my %h = a => 42;        # mutable Hash
  say %h.WHICH;           # OUTPUT: «ObjAt.new("Hash|1402...888")␤»
  
  my %m is Map = a => 42; # immutable Map
  say %m.WHICH;           # OUTPUT: «ValueObjAt.new("Map|AAF...09F61F")␤»
  ```
  
  If you create a class that should be considered a value type, you should add a `WHICH` method to that class that returns a `ValueObjAt` object, for instance:
  
  ```raku
  class YourClass {
      has $.foo;  # note these are not mutable
      has $.bar;
  
      method WHICH() {
          ValueObjAt.new("YourClass|$!foo|$!bar");
      }
  }
  ```
  
  Note that it is customary to always start the identifying string with the name of the object, followed by a "|". This to prevent confusion with other classes that may generate similar string values: the name of the class should then be enough of a differentiator to prevent collisions.
  
  # [Typegraph](# "go to top of document")[§](#typegraphrelations "direct link")
  
  Type relations for `ValueObjAt`
  
  
  
  raku-type-graph
  
  
  
  ValueObjAt
  ValueObjAt
  
  
  ObjAt
  ObjAt
  
  
  ValueObjAt->ObjAt
  
  
  
  Mu
  Mu
  
  
  Any
  Any
  
  
  Any->Mu
  
  
  
  ObjAt->Any
  
  [Expand chart above](/assets/typegraphs/ValueObjAt.svg)
  