Re: Velocity truth

2017-02-06 Thread Claude Brisson
Another try: 1) return false for a null object 2) return its value for a Boolean object, or the result of the getAsBoolean() method if it exists. 3) If directive.if.emptycheck = false (true by default), stop here and return true. 4) check for emptiness: - return whether an array is

Re: Velocity truth

2017-02-06 Thread Michael Osipov
Am 2017-02-06 um 19:45 schrieb Nathan Bubna: On Mon, Feb 6, 2017 at 10:32 AM, Michael Osipov wrote: Am 2017-02-06 um 19:23 schrieb Nathan Bubna: On Mon, Feb 6, 2017 at 9:43 AM, Michael Osipov wrote: 7) check object for a length() or size()

Re: Velocity truth

2017-02-06 Thread Nathan Bubna
On Mon, Feb 6, 2017 at 10:32 AM, Michael Osipov wrote: > Am 2017-02-06 um 19:23 schrieb Nathan Bubna: > >> On Mon, Feb 6, 2017 at 9:43 AM, Michael Osipov >> wrote: >> >>> 7) check object for a length() or size() method, if so return whether it >>>

Re: Velocity truth

2017-02-06 Thread Michael Osipov
Am 2017-02-06 um 19:23 schrieb Nathan Bubna: On Mon, Feb 6, 2017 at 9:43 AM, Michael Osipov wrote: 7) check object for a length() or size() method, if so return whether it returns 0, but I agree with Alex Fedotov that we could skip those methods if we already took care

Re: Velocity truth

2017-02-06 Thread Michael Osipov
Hi Claude, Am 2017-02-06 um 17:55 schrieb Claude Brisson: Hi Christopher. The spec has evolved quite a bit since then: the course I've taken is this one (and remarks are welcome): 4) check for empty objects by class: - return whether the collection is empty for a Collection object 5) check

Re: Velocity truth

2017-02-06 Thread Claude Brisson
Hi Christopher. The spec has evolved quite a bit since then: the course I've taken is this one (and remarks are welcome): 1) return false for a null object 2) return its value for a Boolean object, or the result of the getAsBoolean() method if it exists. 3) If directive.if.emptycheck =

Re: Velocity truth

2017-02-06 Thread Nathan Bubna
On Mon, Feb 6, 2017 at 7:48 AM, Christopher Schultz < ch...@christopherschultz.net> wrote: > Claude, ... > > $obj returns false from getAsBoolean() (provided there is such a method) > > $obj is empty string (CharSequence w/length 0) > > $obj returns true from isEmpty() (provided there is such a

Re: Velocity truth

2017-02-06 Thread Alex Fedotov
I would try to something similar to Javascript convention https://javascriptweblog.wordpress.com/2011/02/07/truth-equality-and-javascript/ substituting CharSequence instead of String (so that other empty String like objects i.e. StringBuilder would evaluate as false) and also treating empty arrays

Re: Velocity truth

2017-02-06 Thread Christopher Schultz
Claude, On 1/28/17 10:15 AM, Claude Brisson wrote: > Here's what had been specified by Nathan at the time (order is > meaningful, and falseness seems easier to specify than truth): > > $obj is null > $obj is boolean false > $obj returns false from getAsBoolean() (provided there is such a method)

Re: [VOTE] Michael Osipov as committer

2017-02-06 Thread Christopher Schultz
Nathan, Hey! I didn't know I was on the PMC. :) Vote below. On 1/27/17 1:05 PM, Nathan Bubna wrote: > Hey folks, > > Michael Osipov has been rigorously and vigorously reviewing the progress of > Engine 2.0, with commits specific and knowledgeable to be nigh > indistinguishable from code