Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Complex policies

Reply
Thread Tools

Complex policies

 
 
anderberg
Guest
Posts: n/a
 
      12-16-2005
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.
 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      12-16-2005
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How complex is complex? Kottiyath Python 22 03-28-2009 10:11 PM
wsdl2java: method parameter a complex type that extends another complex type Robert Mark Bram Java 0 02-04-2007 10:06 AM
[XML Schema] Content type of complex type definition with complex content Stanimir Stamenkov XML 2 10-25-2005 10:16 AM
For expert on complex loops (reposted) - complex looping problem news.amnet.net.au Java 1 04-13-2004 07:10 AM
Complex policies for restricting users going to Internet jmarkotic Cisco 2 01-08-2004 09:33 PM



Advertisments