Arc Forumnew | comments | leaders | submitlogin
3 points by cchooper 5926 days ago | link | parent

I tried it on Anarki and it worked fine.

  (mac defclass (name attributes methods) `(def ,name (,@attributes) (let methodz (obj ,@methods) (fn (method . args) ((methodz method) args)))))
  (defclass make-point ((o x 0) (o y 0))  (get-x [+ x] get-y [+ y] set-x [= x (car _)] set-y [= y (car _)]))
  (= point (make-point 3 4))
  (point 'get-y)
  => 4
BTW, you can change (,@attributes) to just ,attributes and it will work the same.


3 points by cchooper 5926 days ago | link

I've tried it on Arc2 and am getting the same message as you. So this must be a bug in Arc2 that's been fixed on Anarki.

-----