On Wed, 2009-06-24 at 12:36 -0400, Stephen C. Gilardi wrote:

> This would break the current (perhaps unimportant) invariant that  
> struct returns a PersistentStructMap. If keeping that invariant is  
> desirable, similar changes could be made within  
> PersistentStructMap.java instead.

It seems somehow desirable to keep this invariant.
I had a quick look at PersistentStructMap.java and it seems (again, a
very quick look on someone's else java program cam give you false ideas
about what's going on) that removing the test that throws an exception
when the set of keys is null in createsSlotMap would nearly work.

The loop just after that would degrade to doing nothing, and a Def
containing an empty list of keys and an empty map from keys to
position. 

Then only the conversion to Seq needs to be modified, to take into
account that keys might be null. (either modifying the constructor or
first and next).

 Alternatively, a null keys can be replaced by an empty list in the
createsSlotMap.

Best,

Nicolas.





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to