diff options
author | Rich Hickey <richhickey@gmail.com> | 2009-11-04 12:31:34 -0500 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2009-11-04 12:31:34 -0500 |
commit | 7a10c9077b5d037e782b2bc63c821f42337e9e04 (patch) | |
tree | 37a2b366a4fc9a08386f802cc674dbad41315312 /src/clj | |
parent | 406fc1c00f8138d47445047c9e17a8af12fefcff (diff) |
generate second ctor for defclass/type taking designated fields only, defaulting rest to nil
Diffstat (limited to 'src/clj')
-rw-r--r-- | src/clj/clojure/core_deftype.clj | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/clj/clojure/core_deftype.clj b/src/clj/clojure/core_deftype.clj index 3149e954..22e4700b 100644 --- a/src/clj/clojure/core_deftype.clj +++ b/src/clj/clojure/core_deftype.clj @@ -106,10 +106,11 @@ writes the .class file to the *compile-path* directory. When not compiling, does nothing. - A constructor will be defined, taking the designated fields followed - by a metadata map (nil for none) and an extension field map (nil for - none). In the method bodies, the (unqualified) name can be used - to name the class (for calls to new etc). + Two constructors will be defined, one taking the designated fields + followed by a metadata map (nil for none) and an extension field + map (nil for none), and one taking only the fields (using nil for + meta and extension fields). In the method bodies, the (unqualified) + name can be used to name the class (for calls to new etc). See deftype for a description of fields, methods, equality and generated interfaces." |