Content
@
0 reply
0 recast
0 reaction
t11s
@transmissions11
Imp-ling a MUD game that has some config "values" that are pure functions (e.g. map time passed to growth, etc) What kind of pattern would you use to implement this most cleanly/idiomatically? a) Library all systems that need the functions import b) A system that other systems call c) ?
1 reply
0 recast
5 reactions
t11s
@transmissions11
(a) Is the prettiest in terms of how the code looks but (b) is the easiest to upgrade and deal with in the long run I think
1 reply
0 recast
1 reaction
frolic
@frolic
This! (a) will also be cheaper to call gas wise. If we made it easier to upgrade all those systems, would that help?
1 reply
0 recast
1 reaction
t11s
@transmissions11
Definitely! ngl I can't shake the feeling that it's a bit gross to copy-pasta the functions into every system that needs them — but it's def the most efficient and if MUD can handle the upgrades safely I still think it's the right move.
1 reply
0 recast
0 reaction
t11s
@transmissions11
obvs i mean implicitly copy-pasta as that's what libs are doing under the hood hehe
1 reply
0 recast
1 reaction