3 ms·
One way of doing it would be to use a record type, one part of which would be the list of players. This is analogous to the composition strategy in OO. You coul
by nbouscal 13y ago
One way of doing it would be to use a record type, one part of which would be the list of players. This is analogous to the composition strategy in OO. You could then manipulate values of that record type using lenses.
The important question is what you actually want to do with this data. The thing that has always seemed crazy to me about OO is how you can have page-long discussions like this one without even talking about what the data is being used for. The notion instead is to "model the real world", which sends you off on a wild goose chase that is almost always unnecessary.