17.05.2015 Views

zl:1 - FTP

zl:1 - FTP

zl:1 - FTP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

deff 134<br />

See the section "Special Forms for Defming Special Variables" in Symbolics<br />

Common Lisp: Language Concepts.<br />

deff function definition Special Form<br />

deff is a simplified version of def. It evaluates the form definition-creator,<br />

which should produce a function, and makes that function the defmition of<br />

function-spec, which is not evaluated. deff is used for giving a function<br />

spec a definition that is not obtainable with the specific defining forms<br />

such as defun and macro. For example:<br />

(deff faa 'bar)<br />

makes foo equivalent to bar, with an indirection so that if bar changes,<br />

foo likewise changes;<br />

(deff faa (function bar»<br />

copies the definition of bar into foo with no indirection, so that further<br />

changes to bar have no effect on foo.<br />

I<br />

defflavor name instance-variables component-flavors &rest options Special Form<br />

name is a symbol that is the name of this flavor. defflavor defines the<br />

name of the flavor as a type name in both the Common Lisp and Zetalisp<br />

type systems: See the section "Flavor Instances and Types" in Symbolics<br />

Common Lisp: Language Concepts.<br />

instance-variables is a list of the names of the instance variables containing<br />

the local state of this flavor. Each element of this list can be written in<br />

two ways: either the name of the instance variable by itself, or a list containing<br />

the name of the instance variable and a default initial value for it.<br />

Any default initial values given here are forms that are evaluated by<br />

make-instance if they are not overridden by explicit arguments to<br />

make-instance.<br />

If you do not supply an initial value for an instance variable as an argument<br />

to make-instance, and there is no default initial value provided in<br />

the defflavor form, the value of an instance variable remains unbound.<br />

(Another way to provide a default is by using the :default-init-plist option<br />

to defflavor.)<br />

component-flavors is a list of names of the component flavors from which<br />

this flavor is built.<br />

Each option can be either a keyword symbol or a list of a keyword symbol<br />

and its arguments. The options to defflavor are described elsewhere:<br />

See the section "Summary of defflavor Options" in Symbolics<br />

Common Lisp: Language Concepts.<br />

See the section "Complete Options for defflavor" in<br />

Symbolics Common Lisp: Language Concepts.<br />

Several of these options affect instance variables. These options can be given in<br />

two ways:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!