タグ

ブックマーク / www.aiai.ed.ac.uk/~jeff (1)

  • A Brief Guide to CLOS

    Jeff Dalton <J.Dalton@ed.ac.uk> Contents: Introduction Defining classes Instances Inheritance of slot options Multiple inheritance Generic functions and methods Method combination Introduction This is a brief introduction to CLOS that says enough for someone who already knows something about Common Lisp to start using CLOS. CLOS stands for Common Lisp Object System and is pronounced "see loss" or

    kiyo_hiko
    kiyo_hiko 2013/06/27
    そのうち読む メモ。CLOSの記法は、単純には「(defclass rect () ((w :accessor width :initarg :w) (h :accessor height :initarg :h))) (defgeneric perimeter (x)) (defmethod perimeter ((x rect)) (* 2 (+ (width x) (height x)))) (perimeter (make-instance 'rect :w 10 :h 5))」継承も
  • 1