I agree with Ryan and would add that you could do more with some of Racket's other features. For instance, in my prototype library:
https://github.com/jeapostrophe/exp/tree/master/foo 1) I use immutable hash tables to make object extension functional, and 2) Use static syntax bindings to give method names a first class nature, rather than just using symbols. This allows independent "traits" to use the same syntactic names but keeps them distinct, so they can be renamed, etc. If you want to see how to use syntax parameters to get 'self', my code does that too. Jay On Wed, Jan 23, 2013 at 6:57 AM, Lewis <[email protected]> wrote: > I'd always found prototype object systems interesting, and thought > they might be a good fit for racket - so I made one about a month or > so ago > > Features: > - Prototype based, no distinction between classes and instances. > - Multiple inheritance, methods are looked up in depth first search > - Declarative syntax, can create an object with a single macro, no need to > clone > and mutate > - Immutable objects, which can be inherited by and inherit from mutable ones > > https://gist.github.com/4605785 - go to line 195 shows its usage. > > Basically, I am after feedback on my code, the concept in general, and > anything really. I actually use it over the java-style class object > system racket has, it's very much my vision of what objects should be > like. But yes, any feedback would be welcome. > ____________________ > Racket Users list: > http://lists.racket-lang.org/users -- Jay McCarthy <[email protected]> Assistant Professor / Brigham Young University http://faculty.cs.byu.edu/~jay "The glory of God is Intelligence" - D&C 93 ____________________ Racket Users list: http://lists.racket-lang.org/users

