Hacker News new | past | comments | ask | show | jobs | submit login

You don't need transactions for this, just use immutable data structures and you get _transactional like_ behaviour for free.



I guess that you could think of Realm as an immutable data structure (as it is immutable outside of very specific conditions like inside write transactions and a state refreshes at "safe" points in the code. But the experience is totally different. It basically feels like you have plain old (mutable) objects, but they can be safely shared between threads without any of the overhead (mentally and performace wise) of locks.


It's not free. The cost is reallocation every time something changes, which in many cases is all the time. Not all the world's a web page.


> Not all the world's a web page

Did you really need that patronising statement?

My point wasn't about memory usage, it was about development cost. The transactional behaviour emerges by default from use of immutable structures.

Any transactional system will have memory performance characteristics that are very similar to using immutable structures, if not worse, so your point was, well, pointless.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: