By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,238 Members | 1,746 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,238 IT Pros & Developers. It's quick & easy.

Complex policies

P: n/a
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?

--
anderberg: People are just mutations. Some worse than others.
Dec 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
anderberg wrote:
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?


I think it's the choice you need to make when designing your system.
Nothing in the language says your template arguments need to be simple
or cannot be as complex as you can handle. Whether it makes sense to
subdivide your more complex parts of the system into simpler ones, is
completely up to you (and the group you're working in).

For language-neutral advice on OOD and OOA, try 'comp.object' newsgroup.

V
Dec 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.