Toronto Smalltalk User Group Message Board › Immutable data structures for Smalltalk

Immutable data structures for Smalltalk

Adam S.
AdamSpitz
Toronto, ON
Post #: 1
Just posted the fruits of our work from Monday's meeting:

http://www.smalltalkh...­

Clojure-style immutable data structures for Smalltalk: HashMap, HashSet, Seq, List, Vector, Queue. Also a few simple abstractions for handling mutation in sane ways: atoms, promises, channels.

There's plenty more work left to be done, but I think it's a good start. (And it was a pleasure implementing this stuff in the Smalltalk environment! Last time I did this, it was in flat text files in a crummy language with a terrible debugger.)

Next step: hack Smalltalk's syntax to add Map and Vector literals and destructuring. Also, Dave, you mentioned something about STM - that'd be a good addition to this library. (I implemented Atoms, but it'd be cool to have Refs with proper transactions.) I doubt I'll have time for this stuff myself, though. If anybody wants to take over maintenance of this library, let me know - I'd be glad to hand over the password to the smalltalkhub.com repository.
Aaron
cybernetician
Toronto, ON
Post #: 34
Impressive! I've been learning Clojure (I'm currently about halfway through The Joy of Clojure), so it's interesting to see how immutable data structures and lazy sequences can be added to Smalltalk.
Powered by mvnForum

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy