On Wed, 2005-06-29 at 01:38 +0200, Emmanuel Bourg wrote:
> Dumb question, why do we even need a VariableResolver interface ? A 
> String->Object association is a common job for a Map after all. We 
> should be able to build a sophisticated resolver system in 
> [configuration] with a simple resolve(String, Map) method in [lang].

You mean that someone with special resolving requirements should provide
a custom class that implements Map?

That's doable I guess, and it does provide a unified API that is nice
for those cases where the source data really is in a standard Map object
(which will probably be the case 95% of the time).

However for the other cases the user has to implement the Map interface
which it's quite a lot of work. As the resolve method actually uses only
the "get" method on the map it seems a shame to require the user to
implement the full Map interface.

And the get method takes an Object key and returns an Object result,
whereas resolve always provides a String key and returns a String
result. So using a map means using types far more generic than
necessary; not fatal but not elegant.

Regards,

Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to