Opaque application data types are features of the interpreted languages. Such
types have unique id-s, pointer (
void *) C representations and are
treated not so specially by language.
See Application Defined Types.
The application defined types would not be treated too specially by the interpreter, the application side of it that is, if it wouldn’t come to declare variables of such types, to track and manage data of said types, to follow references to it, etc.
To begin, the list of allowed declarable types, including for each item the type name and type id is to be linked into the parsing context (the one provided to the application extention programming language parser).
Yet, the reason for which application data types exists (instead perhaps of having a single type for all application data) is that the application would presumably very much like not to mix data of different types. Such, if an application invents two types, say opened files and associative arrays, it would like to be assured that the functions processing opened files will not be passed data of the associative array type and conversely, the functions processing associative arrays will not be passed data of the opened file type.
Once variables are declared and data is created, initialization with sensible values is the next thing to do.
The objects behind the values visible in the executed program need to be destroyed once they are out of use.
The interpreter would know when to call the creating and the destruction of data, but it would not know how to do it. For that, the application that introduced the new types will need to equip the interpreter with the methods to perform the tasks.
See Execution Completion Cleanup.