Jason van Zyl wrote:
>
> On Thu, 9 Nov 2000, John McNally wrote:
>
> > Was there a decision against allowing methods with empty arguments to be
> > specified without the ()?
> >
> > Example.
> >
> > $browser.isJavaScriptOK
> >
> > as opposed to
> >
> > $browser.isJavaScriptOK()
> >
> > It obviously wouldn't be too hard to add the first form, is anyone
> > opposed?
>
> As a standard boolean property I think it should be supported
> in the #if directive. So if you have the following:
>
> #if ($user.LoggedIn)
But wouldn't it be easier and more flexible to support the dropping of
empty () in general? Why does Velocity not allow this when it was
something that could be done in WM? I am thinking it is only a couple
of lines of code in ASTIdentifier, am I wrong?
Dropping the "is" would also be worthwhile, but then it also might be
good to check the "has" prefix as well. I don't know if "has" in
allowed in beans, but it is in wide use.
> All results of introspection are cached after the first pass. Not
> only for properties but for all methods as well. The results
> of introspection are actually held in the AST itself in the
> pertinent nodes.
I guess I need to update my checkout, I was concentrating my
investigation on ASTIdentifier, did I miss something or should I be
looking elsewhere?
Thanks,
John McNally