Simple objects are sealed, uninstantiable, and concrete. They are often represented by program literals. Figure 11-2 shows the built-in classes of simple objects.
Figure 11-2 The Simple Object Classes
S | – Sealed | P | – Primary | C | – Concrete | I | – Instantiable |
O | – Open | F | – Free | A | – Abstract | U | – Uninstantiable |
<character>
[Sealed Class]The class of characters.
<object>
None.
The class of characters. All characters are instances of <character>
.
The class <character>
provides the following operations:
Function |
| Description | Page |
---|---|---|---|
|
| Returns true if its first operand is less than its second operand. | |
|
| ||
|
| ||
|
|
<symbol>
[Sealed Class]The class of symbols.
<object>
None.
The <symbol>
class provides a built-in, non-case-sensitive dictionary that associates a string with a unique immutable object that can be compared with ==
(which should be faster than calling a string-comparison routine). This dictionary is accessed through the as
function: as(<symbol>, string)
and as(<string>, symbol)
. Any string can be used.
The class <symbol>
provides the following operation:
Function |
| Description | Page |
---|---|---|---|
|
|
<boolean>
[Sealed Class]The class of boolean values.
<object>
None.
None.
The class of boolean values. The literal constants #t
and #f
are general instances of <boolean>
. Note that for the purposes of conditional expressions, all objects besides #f
count as true. (This does not imply any other objects are instances of <boolean>
.)