2021/11/23/PortBank refactoring: Difference between revisions
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
Do we want to not assume the values are all stored in an array? Also, there may be some cognitive confusion between accessing an array of Units and an array of values from those Units. | Do we want to not assume the values are all stored in an array? Also, there may be some cognitive confusion between accessing an array of Units and an array of values from those Units. | ||
I think what we need is a variant of the Array object which is designed for an array of Status objects. |
Revision as of 16:19, 23 November 2021
Task B kind of needs to be done first. I'm thinking that the Array traits family needs to be rethought. Does it make sense to have separate traits for read and write? Does it make sense to have the read-trait provide an abstract universal array access method, but not the write-trait?
More to the point, it would be nice if there was some way to impose a class (i.e. Unit) on the value-types we're reading/writing in the Array... but there may not be a sensible way to do that in PHP.
Do we want to not assume the values are all stored in an array? Also, there may be some cognitive confusion between accessing an array of Units and an array of values from those Units.
I think what we need is a variant of the Array object which is designed for an array of Status objects.