Release 10.1A: OpenEdge Getting Started:
Object-oriented Programming

> ## Classes and strong typing

> Classes in Progress are strongly-typed. Strong typing means that the class definition and any references to the class are checked for validity at both compile time and run time. As described in a previous chapter (see Chapter 1 "Object-oriented Programming and the Progress 4GL"), compile-time validation is one of the key advantages of programming with classes.

> In order to support strong typing, either the source files or r-code for all classes in an application must be appropriately available at compile time. Thus, when you are compiling a class that extends a class hierarchy, all the classes and interfaces for the hierarchy must be available either as source files or as r-code files.

> In addition, the compilation of a subclass forces the recompilation of any class or interface in its class hierarchy. Since a class is built from all of the classes and interfaces in its hierarchy it is important to make sure that the entire hierarchy is up to date. If any class or interface in the hierarchy cannot be compiled, the compilation of the subclass fails.

> Caution: When you compile a class, although Progress automatically compiles all super classes in its class hierarchy, it does not know about and cannot automatically compile any of the subclasses of the class you are compiling. Thus, when you change a super class, you must compile the class and all subclasses of the class to ensure that all objects with this class in their hierarchy inherit the updated state or behavior. Progress, by itself, has no knowledge of these subclasses, so you must keep track of them manually or by using configuration management tools.

> The compiler can handle compilation of a set of classes in any order as long as either the source or r-code can be found for all referenced classes. The compilation of a class can cause many other class files to be examined, and the compilation of a procedure that uses classes can cause those class files to be examined as well.

> For more information on class compilation, see the "Compiling class files" section.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095