2.6 Summary
In this chapter, we covered the following:
We entered Dylan expressions to a listener and saw their values or output.
We used simple arithmetic functions:
+,*,-. We used predicates:=,<,>,even?, andzero?.We described certain naming conventions in Dylan; see Table 2.1.
Dylan element | Example of name |
|---|---|
module variable |
|
constant |
|
class |
|
predicate |
|
We described the syntax of some commonly used elements of Dylan; see Table 2.2.
We defined module variables (with
define variable), constants (withdefine constant), and local variables (withlet).We set the value of variables by using
:=, the assignment operator.We defined a simple but complete Dylan program, consisting of a LID file, a library file, and a program file.
Here, we summarize the most basic information about libraries and modules:
A Dylan library defines a software component — a separately compilable unit that can be either a stand-alone program or a component of a larger program. Thus, when we talk about creating a Dylan program, we are really talking about creating a library.
Each Dylan expression and definition must be in a module. Each module is in a library.
One module uses another module to allow its definitions to use the other module's exported definitions. Most modules need to use the
dylanmodule in thedylanlibrary, because it contains the definitions of the core Dylan language.One library uses another library to allow its modules to use the other library's exported modules. Most libraries need to use the
dylanlibrary, because it contains thedylanmodule.




