« Hyperobject | Main | Multi-threading with SBCL »

New Hyperobject

I released a new version of hyperobject that allows slot options to be specified with the slot definition rather than the class definition. An example demonstrates the difference in the schema:

Old Version
(defclass person ()
  ((last-name :type :string)
   (first-name :type :string)
   (dob :type integer)
   (addresses))
  (:metaclass hyperobject-class-old)
  (:ref-fields (last-name find-person-by-last-name))
  (:subobjects addresses)
  (:fields last-name first-name (dob format-date))

New Version

(defclass person ()
  ((last-name :type :string :reference find-person-by-last-name)
   (first-name :type :string)
   (dob :type integer :print-formatter format-date)
   (addresses :subobject t))
  (:metaclass hyperobject-class)
  (:print-slots last-name first-name dob))

This is much improved and will simply adding new object representation features.

Comments (1)

James:

That's great!

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on November 25, 2002 7:40 AM.

The previous post in this blog was Hyperobject.

The next post in this blog is Multi-threading with SBCL.

Many more can be found on the main index page or by looking through the archives.

Creative Commons License
This weblog is licensed under a Creative Commons License.