Next Prev Up Top Contents Index

make-instance

Generic Function
Summary

Creates and returns a new instance of a class.

Package

common-lisp

Signature

make-instance class &rest initargs &key &allow-other-keys => instance

Arguments

class

A class, or a symbol that names a class.

initargs

An initialization argument list.

Values

instance

A fresh instance of class class .

Description

make-instance behaves as specified in ANSI Common Lisp.

In particular it checks the initialization arguments as calculated by compute-class-potential-initargs.

This check can be suppressed by passing :allow-other-keys t . In addition, LispWorks provides global control over the initarg checking via set-make-instance-argument-checking and per-class control via class-extra-initargs.

Note: in a delivered image, make-instance does not check the initialization arguments.

Compatibility Note

In LispWorks 4.2 and previous versions, make-instance does not check the initargs. If your code contains invalid initargs, you could use one of the techniques mentioned above to resolve it.

See also

class-extra-initargs
compute-class-potential-initargs
set-make-instance-argument-checking


LispWorks Reference Manual - 25 Jul 2003

Next Prev Up Top Contents Index