Category : Files from Magazines
Archive   : DDJ9210.ZIP
Filename : DYLAN.ASC

Output of file : DYLAN.ASC contained in archive : DDJ9210.ZIP
by David Betz

Example 1: A Dylan class definition

(define-class ()
(x required-init-keyword: x:)
(y required-init-keyword: y:))

Example 2: (a) using setter functions to change the value of a slot;
(b) calling the setter function directly; (c) an alternate use of
the setter function


(define foo (make 😡 12 y: 23))
(x foo) => 12
(y foo) => 23


((setter x) foo 99)


(set! (x foo) 99)

Example 3: The doubly-linked list mixin


(define-class ()


(define-class ( ))

Example 4: Defining methods for classes that use the entity> mixin

(define-method initialize ((x ))
(set! (next x) x)
(set! (prev x) x))

(define-method add-after ((e1 )
(e2 ))
(bind ((e3 (next e1)))
(set! (next e1) e2)
(set! (next e2) e3)
(set! (prev e3) e2)

(set! (prev e2) e1)))

Example 5: (a) defining a method for that returns both coordinates;
(b) binding the two values in (a) to variables


(define-method coordinates ((p ))
(values (x p) (y p)))


(bind ((x y (coordinates foo)))
... do something with x and y ...

  3 Responses to “Category : Files from Magazines
Archive   : DDJ9210.ZIP
Filename : DYLAN.ASC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: