Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How does this compare to seamless-immutable? #5

Closed
holyjak opened this issue May 7, 2015 · 2 comments
Closed

Question: How does this compare to seamless-immutable? #5

holyjak opened this issue May 7, 2015 · 2 comments

Comments

@holyjak
Copy link

holyjak commented May 7, 2015

Hello,

I wonder whether I should pick seamless-immutable or icepick. They both seem to be doing the same thing, providing utilities for "modifying" deeply frozen data structures. I can see some differences but know too little to be able to really compare them and decide. Could you be so kind and describe the advantages of seamless over icepick and vice versa? Thanks a lot!

PS: I'll ask at the other project as well

@aearly
Copy link
Owner

aearly commented May 7, 2015

These two are very similar in their goals, but differ in the API. seamless-immutable overloads certain array methods, such as [].map and [].filter to return immutable values, but I leave the built-ins alone and instead provide icepick.map(arr, fn), icepick.filter(arr, fn), etc. functions (similar to how lodash/underscore do it). This is to make interop with other libraries easier -- other libraries might rely on the array built-ins returning mutable collections.

Overall the API is more like mori than a fluent/method-based API.

icepick doesn't support freezing Dates currently -- it will leave them as-is, unfrozen. I'm considering converting them to timestamps or ISO date strings. It also will throw if it is used with a collection with circular references -- doing that prevents some nasty bugs.

@holyjak
Copy link
Author

holyjak commented May 8, 2015

Thanks a lot! Perhaps it would be useful to add this to the README?

@aearly aearly closed this as completed in 45f543b May 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants