Initialization

Language Environment supports four forms of preinitialized environments. The first supports the execution of main routines. The second is a special form of the first, that allows multiple preinitialized environments, for executing main routines. to be created within the same address space. The third supports the execution of subroutines. The fourth is a special form of the third, that allows multiple preinitialized environments, for executing subroutines, to be created within the same address-space.

The primary difference between these environments is the amount of Language Environment initialization (and termination) that occurs on each application invocation call. With an environment that supports main routines, most of the application's execution environment is reinitialized with each invocation. With an environment that supports subroutines, very little of the execution environment is reinitialized with each invocation. This difference has its advantages and disadvantages.

For the main environment, the advantages are:
  • A new, pristine environment is created.
  • Runtime options can be specified for each application.
and the disadvantages are:
  • Poorer performance.
For the subenvironment, the advantages are:
  • Best performance.
and the disadvantages are:
  • The environment is left in what ever state the previous application left it in.
  • Runtime options cannot be changed.