Comparison of Pascal and C - Later Pascal Implementations and Extensions

Later Pascal Implementations and Extensions

Some popular Pascal implementations have incorporated virtually all C constructs into Pascal. Examples include type casts, being able to obtain the address of any variable, local or global, and different types of integers with special promotion properties.

However, the incorporation of C's lenient attitude towards types and type conversions can result in a Pascal that loses some or all of its type security. For example, Java and C# were created in part to address some of the perceived type security issues of C, and have "managed" pointers that cannot be used to create invalid references. In its original form (as described by Niklaus Wirth), Pascal qualifies as a managed pointer language, some 30 years before either Java or C#. However, a Pascal amalgamated with C would lose that protection by definition. In general, the lower dependence on pointers for basic tasks makes it safer than C in practice.

The Extended Pascal standard extends Pascal to support many things C supports, which the original standard Pascal did not, in a type safer manner. For example, schema types support (besides other uses) variable-length arrays while keeping the type-safety of mandatory carrying the array dimension with the array, allowing automatic run-time checks for out-of-range indices also for dynamically sized arrays.

Read more about this topic:  Comparison Of Pascal And C

Famous quotes containing the words pascal and/or extensions:

    Undoubtedly equality of goods is just; but, being unable to cause might to obey justice, men has made it just to obey might. Unable to strengthen justice, they have justified might—so that the just and the strong should unite, and there should be peace, which is the sovereign good.
    —Blaise Pascal (1623–1662)

    The psychological umbilical cord is more difficult to cut than the real one. We experience our children as extensions of ourselves, and we feel as though their behavior is an expression of something within us...instead of an expression of something in them. We see in our children our own reflection, and when we don’t like what we see, we feel angry at the reflection.
    Elaine Heffner (20th century)