Hi, I've been trying to build a simple wrapper for a hash table, that I call Bundle, such that (Bundle x: 5 y: 10) would return a bundle object, let's call it b, so that I could refer to its fields using b:x and modify them using (set! b:x new-value) And such that it would print itself as (Bundle x: 5 y: 10) and be equal to every other object with the same keys and values. I have found that Kawa offers a gnu.mapping.HasNamedParts interface which facilitates value reference, so that if I define the following class, it lets me refer to the contents of a hash map: (define-simple-class Bundle (gnu.mapping.HasNamedParts) (table ::java.util.Map (java.util.HashMap)) ((get key::String) (table:get key)) ((isConstant key::String)::boolean #f) ((*init*) ;for test purposes (table:put ("x":toString) 5))) (define b ::Bundle (Bundle)) #|kawa|# b:x 5 However, when I invoke (set! b:x 5) Kawa responds with the following error: java.lang.RuntimeException: no such field x in Bundle at gnu.kawa.reflect.SlotSet.apply(SlotSet.java:115) at gnu.kawa.reflect.SlotSet.setField(SlotSet.java:25) at gnu.kawa.functions.SetNamedPart.apply3(SetNamedPart.java:52) at gnu.mapping.Procedure3.applyToObject(Procedure3.java:61) at gnu.mapping.Procedure.applyToConsumerDefault(Procedure.java:75) at gnu.mapping.CallContext.runUntilDone(CallContext.java:586) at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:343) at kawa.Shell.run(Shell.java:300) at kawa.Shell.run(Shell.java:183) at kawa.repl.processArgs(repl.java:724) at kawa.repl.main(repl.java:830) I also saw that there is the gnu.mapping.HasSetter interface, but the getSetter method seems not to be invoked in that context. The source code for the gnu.kawa.functions.SetNamedPart.apply3 method reveals, that there was a plan for supporting this -- the method begins with a commented-out fragment: /* if (container implements HasNamedParts) return ((HasNamedParts) container).getNamedPart(part); */ which wouldn't work with current Kawa, because the HasNamedParts interface doesn't containt getNamedPart method, and instead it contains a method called get. I think that this could be fixed by: - adding a method Object set(String key, Object value) to the HasNamedParts interface - uncommenting and fixing the above snippet to invoke the above method. By the way, the interface also contains isConstant method, which doesn't seem to be documented anywhere. I think that also - for consistency - the interface should also provide a boolean hasPartNamed(String name) method. But this only solves one problem, and there's another one, namely - when I try to initialize Bundle as, say (Bundle x: 5 y: 10) I get the following warnings: /dev/tty:6:20: warning - no field or setter 'x' in class Bundle /dev/tty:6:20: warning - no field or setter 'y' in class Bundle These are issued from the build() method in gnu.kawa.reflect.CompileBuildObject. It does seem that this class doesn't take into account the existence of the HasNamedParts interface at all (but I don't understand it well enough to come up with any idea of fixing it). And the *init* method doesn't seem to accept variable-length arguments. On the other hand, if I wanted to provide a lot of *init* methods like ((*init* k1::gnu.expr.Keyword v1) (table:put (keyword->string k1) v1)) ((*init* k1::gnu.expr.Keyword v1 k2::gnu.expr.Keyword v2) (table:put (keyword->string k1) v1) (table:put (keyword->string k2) v2)) then I'd need to quote the keywords in order to make it work (which isn't something that I want). Is there any way out of this situation?