(no title)
darioush | 11 months ago
It's okay to create a new data structure that combines some primitive data types in a "struct", like an array that tracks its length.
But we don't want to "build abstractions and associate behavior to them" (just associate behavior to data structures like push/pop).
whattheheckheck|11 months ago
darioush|11 months ago
I suggest this is a good notation for data structures like, stack.push(10) or heap.pop()
I'm suggesting we don't use this notation for things like rules to validate a file, so I suggest we write validate(file, rules) instead of rules.validate(file).
Then we can express the rules as a data structure, and keep the IMO unrelated behavior separate. Note then we don't need to worry about whether it should be file.validate(rules) perhaps. Who does the validation belong to? the rules or the file? the abstractions that are created by non-obvious answers to "who does this behavior belong to" are generally problems for future changes.