A
anderberg
Reading about policies in Andrei Alexandrescu's Modern C++
Design, I was wondering about the complexity of policies.
It there a general recommendation that these policies should be
relatively small and simple (compare Create policy in the above
book) or can they be arbitrarily complex? For instance would it
make sense to define a FileParser policy which states how a file
should be parsed? Or should that be deduced further to smaller
components/policies?
Maybe it doesn't matter as long as the policy interface is
followed?
Design, I was wondering about the complexity of policies.
It there a general recommendation that these policies should be
relatively small and simple (compare Create policy in the above
book) or can they be arbitrarily complex? For instance would it
make sense to define a FileParser policy which states how a file
should be parsed? Or should that be deduced further to smaller
components/policies?
Maybe it doesn't matter as long as the policy interface is
followed?