Lecture 4 Notes

We do this by calling which takes a declaration and

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview:  ¡ 1 © , but the program £ £ ©  ¡ % £ © £ ©  has type % ¡ % £ © £  ¡ © ¤&£  ¡ ¡  © $" 1£ ! £ &1£ ¦  !¤¡ £ ©  ¡  § ¨ ¡ ¤¢ ¥£¡ ¢ $' ¦ 3 '£ §  ¡ 56&£ ¨38¡  §£% ¨ ¢ ¡ 1 © £ £ ¡ 6&£ ¨02¡  5 §  ¡ % £ £ &£ ¦  ©  ¢ £ ¡ 6&£ ¨ 5 §  8¡  has type . The declaration in the interface, on the first line of the program, declares to be an abstract type, meaning that outside the module, it is a new base type, like or . The declares to be an abbreviation for corresponding definition inside the module body, but this information is hidden from the rest of the program. This is the abstraction boundary. £ ©  ¡ 1¡ £ 8©  £ 8©  £ ' £ ¡ % £ © The body of the module is the implementation of the interface, and is said to be inside the abstraction boundary. The rest of the program is the client of the interface and is said to be outside the abstraction boundary. 31 By enforcing this abstraction boundary, the type checker guarantees that no program manipulates the values provided by the interface except through the procedures that the interface provides. This gives us a mechanism to enforce the distinction between...
View Full Document

This document was uploaded on 03/17/2014 for the course CSG 111 at Northeastern.

Ask a homework question - tutors are online