Concepts Of Programming Languages
Concepts Of Programming Languages
12th Edition
ISBN: 9780134997186
Author: Sebesta, Robert W.
Publisher: Pearson,
Question
Book Icon
Chapter 6, Problem 20PS
Program Plan Intro

Static type checking:

  • A language is statically-typed if the type of a variable is known at compile time.
  • It allows many type errors to be caught early in the development cycle.
  • Static typing usually results in compiled code which executes more quickly because when the compiler knows the exact data types which are in use, it can produce optimized machine code.
  • It evaluate only the type information which can be determined at compile time, but are able to verify that the checked conditions hold for all possible executions of the program, which eliminated the need to repeat type checks every time the program is executed.

Dynamic type checking:

  • It is the process of verifying the type safety of a program at runtime.
  • Most type-safe languages include some form of dynamic type checking, even if they also have a static type checker.
  • The reason for this is that many useful features or properties are difficult or impossible to verify statically.

Blurred answer
Students have asked these similar questions
In what way is static type checking better than dynamic type checking?
Where does static type checking differ from dynamic type checking?
Is there a difference between static and dynamic type checking?
Knowledge Booster
Background pattern image
Recommended textbooks for you
  • Text book image
    EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781337671385
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT