commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ash .." <equinus...@hotmail.com>
Subject RE: [digester] variable expansion
Date Wed, 03 Dec 2003 22:58:31 GMT


>-----Original Message-----
>From: Simon Kitching [mailto:simon@ecnetwork.co.nz]
>
>
>On Wed, 2003-12-03 at 22:59, ASHWIN Suresh wrote:
> > Sorry to jump in to this thread this way, and perhaps it is too late 
>now.
> > But, have the people here considered using the term "resolve"
> > for this concept?
>
>I don't think it is too late for suggestions like this. Any time before
>the release is not too late :-)

Glad abt that!


> > Perhaps the interface could be named Resolver, with the method 
>resolve().
> > > I can think of ${foo} > xyz as resolving the definition rather than 
>simple
> > substitution,
> > thow at a lower level of abstraction, it is substitution.
>
>The concept of "substitution" is general; expanding/resolving variables
>is just one application of the "substitution" feature. Possibly
>"substitution" could be called "interception", "filtering",
>"pre-processing", "manipulation".

I would go with you. Substitution is more generic, while resolving and 
expanding are more specific activities. Then can it be said that the package 
ought to be substitution, which contains classes (or perhaps methods within 
a class) that do more specific things like resolving and expanding??

Trying to make things more concrete:

Substitution: f(x) > y

Resolution: f(x) > y where,
x is explicitly a resolvabe, indicated by special symbols (escapes): such as 
${} and &;.

Expansion: f(x) > y where,
y is "longer" than x, conversely, x can be viewed as a 
shorter/contracted/abreviated form of y.

Replacement: f(x) > y
A simple replacement of x by y. (Thow the term substitution itself can carry 
this meaning, we "decide" to use that one with a higher/more generic value.)

Pre-processing:
When any kind of manipulation takes place BEFORE any kind of processing! 
Sounds simple eh.

Filtering: f(x) > y
Where sometimes x = y, and at other times, x gives a y that is distinct.



>The "VarExpander" is implemented using the generic "substitution" 
>mechanism.
>I could go for "VarResolver" if other people like the term. The word 
>"Resolver"
>on its own, however, implies the SAX EntityResolver to me; at least that's 
>what I would think of first..

There you are. Entities are another set of  "resolvables", that get 
resolved. So, let's say, we are on track, but here, we are doing variable 
resolving.


>Note that the string to which "var expansion" (in the current terminology) 
>is being applied can have multiple variables mixed with literal data. For 
>example:
>   "this is a ${var} and so is ${this}"
>Is the process of converting this string to its final form "resolving"?
>I'm going to sit firmly on the fence on this one :-)

Just getting the equivalent of ${var} is variable resolving. Do you propose 
another term for the whole process?

> > > If this has been considered and vetoed, please ignore my email.
>
>We haven't really talked about the terminology for this feature.
>I think it is open for discussion. Good names help in so many ways.

Name game, am game!
Besides, what did draw my attention too was that I had only recently 
implemented some code to "resolve" an ant-like variable to its final value.


> > > One more point:
> > > > The spelling "substituter" feels more natural to me than > > 
>"substitutor".
> > > > > cf.:
> > > to write --> writer
> > > to drive --> driver
> > > to expand --> expander
> > > > For Latinate words, the pattern is usually -or.
> > Constructor, translator, delegator, etc.
> > Whenever, the agent form is formed out of removal of -ion, the preferred
> > suffix is -or.
> > Thus, the more appropriate form is substitutor.
> > Again, perhaps this was already discussed.
>
>Yep, all your examples are right to have "-or".
>And also function-->functor.
>
>I'm convinced. Substitutor it is (unless the decision is made to rename
>it completely :-)

Funnily, digester then must be renamed to digestor!
("Now, who's that feisty suggestor?", would you say? ;-))


>English is strange, isn't it? Substitutor but Expander and Resolver.
>How consistent (not)!
>

Strange it is. But there are reasons underlying it. Etymology being one of 
my passions, I have unearthed some of the reasons, but more on that, another 
day, and perhaps on another list.

Ash

_________________________________________________________________
Get Hotmail on your mobile phone http://www.msn.co.uk/msnmobile


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message