Table of Contents
Previous Chapter
[This Appendix is not part of the Standard.]
The following differences exist between this Standard and earlier presentations of the Kernel Library:
- Addition to GENERAL of a query default which returns the default value of the type of the current object. This also addresses the need to obtain the default value for type POINTER; for convenience, since POINTER has no manifest constant, a query default_pointer has also been included. (See page 13.)
- Adaptation of the semantics of copy and equality features (equal, is_equal and their standard_ versions) so that the result is true if and only if the objects are truly identical, and in particular have the same type. This implies a language change too; the previous definition was non-symmetric so that a.copy (b) and equal (a, b) only applied to the fields corresponding to the attributes of a's type. The earlier effect can still be achieved through function stripped, as explained next in 9.5. (See page 12.)
- Addition to GENERAL of a frozen feature same_type which specifies conformance both ways. Addition of the requirement that conforms_to is frozen too. (See page 12.)
- Addition of a number of assertion clauses to the features of GENERAL, in particular to specify more precisely the semantics of equality, copying, cloning and conformance.
- Addition to GENERAL of a function stripped such that stripped (a) is a clone of the current object limited to the fields that apply to a's dynamic type. As a result, the old semantics of copying and equality mentioned in 9.2 may now be achieved through calls such as a.copy(b.stripped(a)) and equal (a, b.stripped(a)). (See page 12.)
- Addition to GENERAL of object_id and id_object to allow unique identification of objects. (See page 12.)
- In class PLATFORM, removal of the assumption that Character_bits, Integer_bits,Real_bits and Double_bits are constants. This does notintroduce any incompatibility with earlier uses except if they relied onthe specific numerical values. (See page 46.)
- Removal of PLATFORM from the universal inheritance hierarchy; PLATFORM is no longer a parent of ANY and hence an ancestor of every class, and has no particular language-defined role; classes that need its facilities must name it explicitly among their proper ancestors. This is actually a language change. (See section 4, page 10.)
- Addition to PLATFORM of features Maximum_integer, Minimum_integer, Maximum_character_code and Minimum_character_code. (See page 46.)
- Addition to COMPARABLE of min and max functions and of a three-way comparison function, three_way_comparison, which returns 0, --1 or 1. (See page 15.)
- Addition to the arithmetic basic classes of functions abs and sign (the latter defined in terms of three_way_comparison). Addition to REAL and DOUBLE of floor, ceiling, rounded and integer_part. Addition to DOUBLE of real_part. (See page 23 and following.)
- Addition of inheritance links making all basic classes (INTEGER and so on) heirs of HASHABLE, so that it is now possible to hash any object. (See section 4, page 10.) Removal of function is_hashable and the corresponding preconditions.
- Addition to ARRAY of features enter and entry as redefinable synonyms to put and item (or infix "@"), the latter becoming frozen. (See page 32.)
- Addition to STORABLE of a procedure independent_store which produces machine-independent representations of object structures. (See page 42.)
- Addition of a few features to class FILE describing file opening and opening modes (such as read-only or read-write). In earlier presentations the corresponding class was UNIX_FILE. The new class is very similar but removes any Unix-specific aspect. (See 5.15, page 39.)
- Changes of names in class STD_FILES and FILE : for consistency with the usual Eiffel naming style, underscores were added and abbrevations were expanded. In the following list (which uses the order of appearance of the features in STD_FILES), the added underscores appear as * and the added letters appear in bold italics: last*character, last*double, last*real, last*integer, last*string, put*boolean, put*character, put*double, put*integer, put_new*line, put*real, put*string, read*character, read*double, read*integer, read*line, read*real, read*stream, read*word, to_next*line. (See 5.14, page 38, and 5.15, page 39.)
- Addition to EXCEPTIONS of a procedure die that terminates the execution cleanly with a given exit status, without triggering an exception. (See page 44.)
- In class STRING, replacement of the adapt function by a more convenient procedure make_from_string which descendants of the class can use to initialize a string-like object from a manifest string, as in create t.make_from_string ("THIS STRING"), where the type of t is a descendant of STRING. (See page 34.)
- Similarly, addition to ARRAY of a procedure make_from_array allowing initialization from a manifest array, as in create a.make_from_array (<<a, b, c, d>>).
- Removal from STRING of a number of features which some committee members judged too specialized: mirror, mirrored, share, shared_with, item_code, has, prepend, set, prune, prune_all. Renaming of replace_substring to put_substring. Removal of fill_blanks, replaced by fill (applying to an arbitrary character). Change of the result type of out to STRING (rather than like Current).
Table of Contents
Next Chapter
|