 : object-id ( obj -- id )
     #! Return the id of an already serialized object 
     <id> serialized get at ;
-
-! Serialize object
-GENERIC: (serialize) ( obj -- )
 
 ! Numbers are serialized as follows:
 ! 0 => B{ 0 }

PRIVATE>

: deserialize ( -- obj )
    ! [
    V{ } clone deserialized
    [ (deserialize) ] with-variable ;
    ! ] with-compilation-unit ;

: serialize ( obj -- )
    H{ } clone serialized [ (serialize) ] with-variable ;

classes.tuple.private ;
IN: serialize

GENERIC: (serialize) ( obj -- )

<PRIVATE

! Variable holding a assoc of objects already serialized
