elanthia-online / norn.rb

a modern replacement for lich.rb
MIT License
2 stars 3 forks source link

immutable data structures #11

Closed ondreian closed 6 years ago

ondreian commented 6 years ago

currently GameObj and descendants are all mutable.

I would prefer to be using immutable data structures for any objects that are shared (by threads), because shared mutable objects are the devil

some background info

I believe the hamster gem is considered the best immutable datastructure gem, if we want to add a dependency.

ondreian commented 6 years ago

implemented via the GameObj mixin here which makes the Object reasonably immutable for now.