
                              Y L i s p  3.6

             - 
                     Common LISP Object System (CLOS)


      YLisp 3.6     CLOS - --
      ()    .    
       ,  ,     
     .          
      .      , -
             (Smalltalk),       
     (generic functions). ,     , -
               
      .

     YLisp    ,   -
         (class precedence  list).  
        ,     
       .       
       ,       -
      (local precedence order),    .

      ,   [CLOS],    
     .

     Built-in-class          
                       YLisp.

     Structure-class         ,
                        defstruct    :type.

     Standard-class       , -
                          defclass,  
                       standart-object.

     ,   - YLisp -     
         .  ,   , -
      .   ,    -
         -  ++,    
           .


      
     ~~~~~~~~~~~~~~~~~~
       defclass       [CLOS].
     ,        -
     .

               
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            ,      , -
             :accessor, :reader  :writer -
          ,   ,       
                  .

           ,        -
           (shared) ,        ,
                 .

              (local)   , -
             ,    -
            .        
           C1    ,    
          C2, ,   C2     
           `' , , 

               (defclass C1 (C3 C2) ...)

                C1 ,   -
            C2     (),    ,
            C3   ,    -
           C2. ,       C1,  C2 -
          .

             
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~
          ,     , 
            :type,      
                          initialize-instance        
          reinitialize-instance.      

               (setf (slot-value ...) value)
          
               (setf (writer-or-accessor-name ...) value),

             ,      -
           ,    [CLOS].

           
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          YLisp        , -
              .

          -        ,  
            defclass,     ;  , 
                ,    -
               .

          -    ,  ..      -
              defclass,     
            .

                ` '  -
           [CLOS].

          1)   -      
             ( eq)  ,          
                     . 
             ,       -
              .

          2) ,        -
              ,      
                .      
                  ,   .
                   -
             - (,   initialize-instance)    
              (      -
                    )      
             .


        
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                        
     make-instance,     (allocate-instance) 
         (initialize-instance)        .     
     initialize-instance,   reinitialize-instance,   
     shared-initialize.

     - YLisp     -
      (initialization argument list),    
               
     .


       
     ~~~~~~~~~~~~~~~~~~~~~~~~
        ,   standard-object,  
      print-object,      -
       (primary method)   ` '.      
      :

          #{class-name slot-name1 value1 ... slot-nameN valueN}.

               
      class-name.     
        *print-shared*.

             -
      *print-length*  *print-level*,  ,   -
           .

       print-object   ,   
      .        -
     ,          :print-function.
               -
     :

       1)  ,

       2)  .

     ,             
     *print-pretty*  *print-escape*.  *print-length*   -
     ,      .
