Libraries
Libraries will be redesigned to be modular. Unlike Java libraries, in which java.lang refers network, regexp, multimedia… actually most of others packages in standard distribution – libraries for our VM will not have such dependencies. All libraries, except the very small core one, will be optional. For example, there will be no standard output and input streams - tracing and logging will be done at core level, and input/output will be done through installable libraries (available for systems where standard input/output streams exists).
Libraries will not only be modular, but will have inheritance design. Unlike Java, where GUI library for MIDP profile (lcdui package) is completely different from AWT and Swing interfaces, our libraries will be designed in the way, that more functional interface will fully preserve the previous level of functionality.
Libraries will be redesigned for better isolation of applications, to allow maximum data and code sharing between processes (tasks), without global variables.
The security safeness will be based not on run-time checks of permissions, but by the library design that will not provide references to unsafe interfaces. For example, an untrusted application will not have a way to obtain an interface that will allow files reading and/or writing, or will have only an interface which will allow access files int a directory where only temporary created files are stored. This implementation of security will heavily relay on ‘views’ of types and on objects with changeable state. For example, there will be a class to read-write files. But in one state (one vtable of the class) it will only have methods for reading files, and in another (full vtable of methods) it will allow writing of files. Both variants of these states will have different ‘view’ (described in ‘programming language’ section). Such design of security is far more safe and allows avoiding most of run-time checks, compared to current Java’s model.
Variables and methods in libraries will need to have extended amount of constraints, to allow safe and optimized compilation. For example, types of all references must specify if this field,
method parameter or return value may or may not be NULL and so on.
Libraries and applications will have versioning (compatibility) information and dependency information. A compatibility information will describe changes in interface (like a ‘bugfixes only’ or ‘some deprecated methods were removed’) compared to base revision. Dependency information will allow determine at installation time whether and which additional libraries need to be installed and which version of separate libraries is required. Libraries will have information about approximate installation size required, VM features required by this code and other information required to ensure, that installation will be successful before code downloading. Applications and libraries will be managed through OSGi or similar interface.