I guess it really depends on your application, but I personally try
to shy away from rigid types. Maybe it's the LISP/Prolog programmer
in me, but as a cons is the universal data structure, all you really
need is a list as a parameter. Or if you prefer, a map, which can be
expressed using cons.
You can of course make your maps "type safe", along the lines of the
CXF Message.
The next exercise for the reader is to design a similar type-safe map
which allows more than one entry whose value has the same type (which
sadly the Message type can't do).
(Hint: define a key type pair<T, S>, and instantiate keys using
pair<String, Class>.)
Call this type Foo.
You can then define one parameter of type Foo, which has all of the
expressive power and type safety of your previous one.
-Fred"NotTryingToBePedandticJustNotDisclosingIntellectualProperty"Dushin
On Dec 20, 2007, at 5:41 PM, Benson Margulies wrote:
If anyone would care to look over my virtual shoulder and tell me
how to
structure this code better, I'm game.