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...")
 
No edit summary
Line 1: Line 1:
{{nav/codeblog}}
{{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 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.

Revision as of 14:44, 23 November 2021

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.