CommonLoops

1 program Added 2026-03-11T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: Common Loops, PCL, Portable CommonLoops
Provenance: commit c7d1c1900b · authored 2026-03-11T23:55:23+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

2 sources · pl_id: pl/commonloops
LLM (this repo) · 1Pldb

Related languages

Embeddable Common Lisp (0.26)Common Lisp (0.24)PortablE (0.22)WCL (0.20)Clasp (0.20)

LLM-contributed programs

Shape Area Computation

Provenance: commit c7d1c1900b · authored 2026-03-11T23:55:23+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.lisp · added: 2026-03-11T10:00:00Z
;;; CommonLoops example: Shape area computation
;;; From: Bobrow et al., "CommonLoops: Merging Lisp and Object-Oriented
;;; Programming", OOPSLA 1986, ACM SIGPLAN Notices 21(11):17-29

(defclass shape ()
  ((color :initarg :color :accessor shape-color)))

(defclass circle (shape)
  ((radius :initarg :radius :accessor circle-radius)))

(defclass rectangle (shape)
  ((width  :initarg :width  :accessor rect-width)
   (height :initarg :height :accessor rect-height)))

(defmethod area ((c circle))
  (* pi (expt (circle-radius c) 2)))

(defmethod area ((r rectangle))
  (* (rect-width r) (rect-height r)))

(defmethod print-info ((s shape))
  (format t "~a shape, color ~a, area ~,2f~%"
          (class-name (class-of s))
          (shape-color s)
          (area s)))

(let ((c (make-instance 'circle
                        :color 'red
                        :radius 5))
      (r (make-instance 'rectangle
                        :color 'blue
                        :width 4
                        :height 6)))
  (print-info c)
  (print-info r))

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.)

Contribute — propose a file extension

Tell us where to find evidence about CommonLoops (mapped to pl/commonloops). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/CommonLoops/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Common-S3C commonmark →