What are the effects of language design in the programming environment?

Programming environments have affected language design generally in two major areas such as features promoting separate compilation and assembly of a program from components, and features aiding program testing and debugging.

  • Separate compilation − In the structure of any huge program it is regularly desirable to have multiple programmers or programming group design, code, and test elements of the program before the last assembly of all the elements into a complete program. This needed the language to be structured so that single subprograms or other elements can be separately compiled and implemented, without the other element, and thus later combined without transform into final programs.

Separate compilation is built problem by the fact that in compiling one subprogram, the compiler can require data about other subprograms or shared data objects, such as

  • The requirement of the number, order, and type of parameters expected by any called subprogram enables the compiler to test whether a call of the external subprogram is accurate. The language in which the different subprogram is coded can also require to be known so that the compiler can set up the suitable “calling sequence” of instructions to share data and control data to the external subprogram during implementation in the form normal by that subprogram.

  • The declaration of data type for any variable referenced is required to permit the compiler to decide the storage representation of the external variable therefore that the reference can be compiled using the suitable accessing rule for the variable (for example, the correct offset within the common environment block).

  • The definition of a data type that is represented externally but can declare some local variable inside the subprogram is required to enable the compiler to allocate storage and evaluate accessing rule for local information.

  • Testing and debugging − Most languages include some features to aid program testing and debugging. A few examples are −

    • Execution trace features − Prolog, LISP, and some other interactive languages support features that enable specific statements and variables to be identified for detection during execution.

    • Breakpoints − In an interactive programming environment, languages provide a feature where the programmer can determine points in the program as breakpoints. When a breakpoint is entered during execution, execution of the program is disrupted and control is given to the programmer at a terminal. The programmer can check and convert the values of the variables and then restore the program from the point of disruption.

    • Assertions − An assertion is a conditional expression inserted as a separate statement in a program, for example, assert (X>0 and A = 1) or (X=0 and A>B+10). The assertion states the relationships that should influence among the values of the variables at that point in the program.