why don't make it case sensitive and if no such case sensitive
property/method was found fall back to a case insensitive match?
it sounds to me like a good solution but i don't know if it's possible
to implement it.
chrigi
Will Glass-Husain wrote:
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"
<[EMAIL PROTECTED]>
Newsgroups: hometree.jakarta.velocity.users
To: <[email protected]>
Sent: Thursday, August 25, 2005 2:30 PM
Subject: Re: Language Lawyer question (was: Re: syntax issue)
"Tim Colson \(tcolson\)" <[EMAIL PROTECTED]> 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
[EMAIL PROTECTED] +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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]