We will need the following further keys on Z4 for the next few features we want to provide:
- Z4K4/equality - type Z8 - a function that takes two instances of the type at hand and returns a Boolean, whether they are the same.
- Z4K5/renderer - type Z8 - a function that takes an instance of the type at hand and a language and returns a string given a short textual representation of the given instance
- Z4K6/parser - type Z8 - a function that takes a string and a language, and turns the given string into an instance if possible
- Z4K7/deserializers - Z810(Z46), list of deserializers - deserializers takes a ZObject and returns a value in the given programming language (see below)
- Z4K8/serializers - Z810(Z64), list of serializers - serializers take a value of a specific type in that programming language and return a ZObject (see below)
We also add two new types, for Deserializers and Serializers:
Z46/Deserializer
- Z46K1/id: points to itself (i.e. type Z46)
- Z46K2/type: of type Z4 (type to be deserialized)
- Z46K3/programming language: of type Z61
- Z46K4/target type: of type Z6 (the name of the type in the given programming language)
- Z46K5/code: of type Z6, the actual code that takes the ZObject in some serialized form and returns a value of type Z46K4
Z64/Serializer
- Z64K1/id: points to itself (i.e. type Z64)
- Z64K2/type: of type Z4 (type to be serialized into)
- Z64K3/programming language: of type Z61
- Z64K4/source type: of type Z6 (the name of the type in the given programming language)
- Z64K5/code: of type Z6, the actual code that takes the value of type Z64K4 and returns a ZObject for internal translation