CLOS is a historical programming language created in 1988.

31Years Old 1,020Users 0Jobs

Example code from Wikipedia:

; declare the common argument structure prototype
(defgeneric f (x y))

; define an implementation for (f integer t), where t matches all types
(defmethod f ((x integer) y) 1)

(f 1 2.0) => 1

; define an implementation for (f integer real)
(defmethod f ((x integer) (y real)) 2)

(f 1 2.0) => 2 ; dispatch changed at runtime
Edit

Last updated February 11th, 2019