3 ms·
Nice talk, I like how he is humble but enthusiast. The records are destructive in the example at the end. Is working with immutable data structures in Racket a
by Kototama 14y ago
Nice talk, I like how he is humble but enthusiast.
The records are destructive in the example at the end. Is working with immutable data structures in Racket as easy as in Clojure?
- kenko 14y agoIIRC, data structures are immutable by default in Racket.
- klibertp 14y agoLists are. Vectors and hashes are not. There are both mutable lists and immutable vectors and hashes though. Edit: and user-defined structs are immutable unless explicitly declared with #:mutable keyword.
- righttrousers 14y agoI know Matthew personally, and he's like that all the time. Very laid-back, and also very go-getter. Difficult combination, but he pulls it off well. Racket's libraries are designed to encourage doing everything with immutable data, though there are plenty of mutable types if you need them. (And of course you can always use boxes.) I don't know enough about Clojure to make a comparison, but I can say that working with immutable data structures in Racket is easy.
- chongli 14y agoOne of Clojure's main selling points is that its vectors, maps and sets are persistent data structures with near-constant time operations (log32N). http://www.infoq.com/presentations/Value-Identity-State-Rich-Hickey http://www.infoq.com/presentations/Value-Identity-State-Rich...