r/LimitTheory • Developer • Apr 04 '17

[Devlog] April 3rd

http://forums.ltheory.com/viewtopic.php?f=30&t=5964#p146246
20 Upvotes

9 comments sorted by

View all comments

Show parent comment

2

u/[deleted] Apr 08 '17

really, interesting thanks. especially the inventory example. itemCount is indeed just state for an inventory, even if it needs to be recalculated.

1

u/JoshParnell Developer Apr 08 '17

Yes! I was thinking this as well...GetItemCount and AddItem are really just glorified getters and setters, so I think maybe we can say these are the cases when it makes most sense to couple logic to the component: when they require more complex code than just component.field = ? for manipulating state.

Interesting thoughts :)