Download
more on type checking n.
Skip this Video
Loading SlideShow in 5 Seconds..
More on Type Checking PowerPoint Presentation
Download Presentation
More on Type Checking

More on Type Checking

97 Vues Download Presentation
Télécharger la présentation

More on Type Checking

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. More on Type Checking

  2. Conversion and Coercion Int C; A = 1.5 + C;

  3. Overloading An id binds to >1 semantic entity in same scope Pascal: f = f + 1 Fortran/PL1: + int or real addition Ada: A(i) Many languages: function decls with different parameter numbers/types Why? What are the challenges in implementing overloaded id’s?

  4. Resolving overloaded symbols • Determine unique meaning – use context • Operators (non-ids) • Ids

  5. Another example

  6. Overriding in Java

  7. Polymorphic Call Sites

  8. Polymorphic Functions:one function decl, multiple type args

  9. Polymorphism, Overloading, Overriding

  10. Type Checking Summary Exercise: With a partner, Outline the main issues you need to know to implement a type checker.