Arc Forumnew | comments | leaders | submitlogin
defstruct in Arc
4 points by xTERM 6068 days ago | 3 comments
Object orientation is good, but I think sometimes it's much simpler to use "defstruct" rather than complex object system. So Arc should have something like this.

P.S. But on the other hand, defstruct brings some duplicate functionality :(



6 points by pg 6066 days ago | link

Use deftem.

-----

1 point by greatness 6067 days ago | link

I believe someone already wrote one, somewhere in this forum.

-----

2 points by kennytilton 6067 days ago | link

This is an extremely lite version (the CL defstruct has a kazillion fetaures, it's CL <g>):

http://common-lisp.net/cgi-bin/viewcvs.cgi/kennysarc2/?root=...

Don't be thrown by the .lisp extensions, it is Arc, I just had to fake my IDE into auto-highlighting the parens.

-----