Name: Anonymous 2010-09-17 17:31
∧_∧ / ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
( ´∀`) < Nyan nyan nyan nyan ni hao nyan
/ | \________
/ .|
/ "⌒ヽ |.イ |
__ | .ノ | || |__
. ノく__つ∪∪ \
_((_________\
 ̄ ̄ヽつ ̄ ̄ ̄ ̄ ̄ ̄ | | ̄
___________| |
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄| |
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄| |
___________| |
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄| |
car is an anonymous union of the different types available (currently <None> and "<List>") and cdr is actually *next. It still needs cleaning up.
struct-like data type, how would you do it? For a struct foo { int bar; }, I've thought about:(foo bar) - Feels Sepplesy, what with 'calling' a struct like it's a function (i.e. overloading)(foo.bar) - Adds more grammar(get-member-of foo 'bar) or similar - could have to involve some hash function or other (slow), unless it's done at compile-time
make-foo, foo?, foo-bar, foo-bar-set! and is honoured by R6RS records and SRFI 99 and most define-struct definitions. The second option is used by Jscheme[1]. The third tends to only be used for classes, and is usually considered bad style. At the end of the day, if you're reinventing Lisp you might as well pick whatever you like best.