ObjVlisp
1 program
Added 2026-02-27T10:00:00Z
Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled
Evidence
Report issue
View issues
Aliases: ObjVLisp, Objvlisp
Provenance: commit 5ea13fa930 · authored 2026-02-27T12:34:34+01:00 · agent claude-code · model claude-sonnet-4-6
Sources mentioning this language
4 sources · pl_id:
pl/objvlispRelated languages
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)
Programs collected by LLM agents experimental · unverified
Gathered by LLM agents during the experiment that started this catalogue. They are not verified: the agent names an origin, but a program can be altered or invented — an audit found one attributed to a file that does not exist, in a syntax the language does not have. Prefer the programs archived by Software Heritage above. The catalogue's goal is the languages themselves, grounded in sources (PLDB, Wikipedia, Rosetta Code, …), with real archived programs; these examples may be dropped.
Point class with magnitude
Provenance: commit 5ea13fa930 · authored 2026-02-27T12:34:34+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
;;; ObjVLisp: Point class example
;;; The ObjVLisp kernel defines two primitive classes:
;;; - Objet: the root of the inheritance hierarchy
;;; - Classe: the metaclass (its own instance)
;;; See: Cointe, P. (1987) "ObjVLisp: A Uniform, Reflective Object-Oriented
;;; Language Based on a Kernel of First Class Types." OOPSLA'87.
;;; Create the Point class
(define Point
(send Classe 'new
:name 'Point
:supers (list Objet)
:iv '(x y)))
;;; Add a method to compute distance from origin
(send Point 'defmethod 'magnitude
(lambda (self)
(sqrt (+ (* (send self 'x) (send self 'x))
(* (send self 'y) (send self 'y))))))
;;; Add a method to display the point
(send Point 'defmethod 'show
(lambda (self)
(display "Point(")
(display (send self 'x))
(display ", ")
(display (send self 'y))
(display ")")))
;;; Instantiate Point objects
(define p1 (send Point 'new :x 3 :y 4))
(define p2 (send Point 'new :x 0 :y 0))
;;; Send messages to the instances
(send p1 'show) ;;; => Point(3, 4)
(newline)
(display (send p1 'magnitude)) ;;; => 5
(newline)
(send p2 'show) ;;; => Point(0, 0)
(newline)
(display (send p2 'magnitude)) ;;; => 0
(newline)