2021/11/23/PortBank refactoring: Difference between revisions

From Woozle Writes Code
Jump to navigation Jump to search
(Created page with "{{nav/codeblog}} 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 an...")
 
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{nav/codeblog}}
{{nav/codeblog}}
[[category:ferreteria]]
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?
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.

Latest revision as of 00:03, 2 July 2022

Codeblog

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.