Re: Velocity truth

2017-01-28 Thread Claude Brisson
Oh, and there is one exception: both of them should of course also be false for the false boolean value. People willing to differentiate null and false do have methods to do so. Claude On 29/01/2017 01:38, Claude Brisson wrote: On 28/01/2017 20:23, Alex Fedotov wrote: You guys should def

Re: Velocity truth

2017-01-28 Thread Claude Brisson
On 28/01/2017 20:23, Alex Fedotov wrote: You guys should definitely leave a way of disabling the toString() conversion in boolean expressions. There are many places where people do null checks if #if($obj)...#end. Classes almost never return an empty string or null string from the toString ca

Re: Velocity truth

2017-01-28 Thread Claude Brisson
On 28/01/2017 20:06, Nathan Bubna wrote: Shame that i can't remember anymore all my reasons for wanting those "getAs" lookups. Wondering why getAsNumber and getAsBoolean are here too. Anyone else recall the use case? And assuming that i had good reason (that did happen sometimes ), i wonder why

Re: Velocity truth (was: Re: [ANNOUNCE] Velocity Engine 2.0 RC6 test build available)

2017-01-28 Thread Alex Fedotov
You guys should definitely leave a way of disabling the toString() conversion in boolean expressions. There are many places where people do null checks if #if($obj)...#end. Classes almost never return an empty string or null string from the toString call. Even worse some classes may use toString

Re: Velocity truth (was: Re: [ANNOUNCE] Velocity Engine 2.0 RC6 test build available)

2017-01-28 Thread Nathan Bubna
Shame that i can't remember anymore all my reasons for wanting those "getAs" lookups. Wondering why getAsNumber and getAsBoolean are here too. Anyone else recall the use case? And assuming that i had good reason (that did happen sometimes ), i wonder why i pushed for bucking the "to()" convention.

Velocity truth (was: Re: [ANNOUNCE] Velocity Engine 2.0 RC6 test build available)

2017-01-28 Thread Claude Brisson
What is the problem? Velocity "truthiness": https://issues.apache.org/jira/browse/VELOCITY-692 It should definitely be part of 2.0. I missed it because the issue was closed, we should have opened a 2.0 one to remember it. Thats's the problem if a closed/resolved issue does not have an assi