On Thu, Sep 15, 2011 at 12:24 PM, Simon Slavin <[email protected]> wrote: > > On 15 Sep 2011, at 5:00pm, Sam Carleton wrote: > >> I don't mean to be difficult, but I simply don't get any indication of >> how exactly COALESCE actually functions from this description: >> >> "coalesce(X,Y,...) The coalesce() function returns a copy of its first >> non-NULL argument, or NULL if all arguments are NULL. Coalesce() must >> be at least 2 arguments. " >> >> I get there has to be at least two arguments, but no where do I see >> where it states it only executes an argument if all the previous one >> fail. > > Fair point. > >> Now it would be crystal clear if it said something like: >> >> "coalesce(X,Y,...) The coalesce() function returns a copy of its first >> non-NULL argument, or NULL if all arguments are NULL. Coalesce() must >> be at least 2 arguments. Coalesce() does use short-circuit >> evaluation." > > That's a poor description because it relies on the reader knowing what > 'short-circuit' means. A better one would be something like
As the saying goes, brevity is the soul of wit:) My theory is that if someone does not know what short-circuit evaluation means, they can look it up and will very quickly end up at Wikipedia that has a complete explaination of it. They might even learn that they can use it in other languages in which they use. It also educates them to a common term in the programming world which well help them communicate, in general. With all that said, I am happy with your more verbose version, too:) I am simply all for improve the documentation:) Sam _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

