velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Will Glass-Husain" <wgl...@forio.com>
Subject Re: Language Lawyer question (was: Re: syntax issue)
Date Fri, 26 Aug 2005 00:47:19 GMT

> How about a bean that contains
> String getXML()
> and
> String getXml()
> methods? Yes, I've seen such code.

My proposal was to make this configurable.  Yes, we all hate endless 
language configuration options, but I thought this issue would be worth it. 
For many systems lowering the barrier to template writers is important, 
especially when you have a well-defined set of references that don't 
conflict.  (And for situations where the references are less well-defined or 
have case issues you would keep the case sensitivity).

For what it's worth, I implemented a test version of Velocity (on my hard 
drive) that implemented this, with case-insensitivity for directives, 
macros, references, properties and macro arguments (all different places in 
the code).  Took me just a few hours.  The only thing I couldn't figure out 
was how to make this configurable for directives since JavaCC has a 
case-sensitivity property that's compiled into the code.

Anyway, I got argued down at the time and decided that we weren't quite 
ready for this.

WILL

----- Original Message ----- 
From: "Henning P. Schmiedehausen" <hps@intermeta.de>
Newsgroups: hometree.jakarta.velocity.users
To: <velocity-user@jakarta.apache.org>
Sent: Thursday, August 25, 2005 2:30 PM
Subject: Re: Language Lawyer question (was: Re: syntax issue)


> "Tim Colson \(tcolson\)" <tcolson@cisco.com> writes:
>
>>> (I've previously argued we should make the entire language
>>> case-insensitive).
>>Interesting... I could go +1 for that.
>
> Why? How about a hash map that contains "foo", "Foo", "FOO" and
> "foO". What would
>
> #foreach ($i in $hashmap.keys())
>  $i --> $hashmap.get($i)
> #end
>
> result in?
>
> Even if Velocity should be simple for template writers, it still
> interfaces with business logic. And here, case-sensititivy counts a
> lot. How about a bean that contains
>
> String getXML()
>
> and
>
> String getXml()
>
> methods? Yes, I've seen such code.
>
> I'd -0 for case insensitivity. I don't see good reasons for it and I
> can imagine a lot of problems stemming from it.
>
> Regards
> Henning
>
>
> -- 
> Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
> hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/
>
> RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
>   Linux, Java, perl, Solaris -- Consulting, Training, Development
>
>       4 - 8 - 15 - 16 - 23 - 42
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 


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


Mime
View raw message