> There's nothing wrong with that.

Not unless style counts for something. X is Y looks far too much like X
as Y for my taste. I'd rather do a little extra typing to have clear
logic than to have clearly unclear code like that. My first thought when
I saw this was "doesn't he mean AS?" If I saw something like this in my
code I'd expect some major comments to clarify why the code really does
mean IS and not AS.

Just my two cents.

John

-----Original Message-----
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Darren Duncan
Sent: Tuesday, October 27, 2009 7:08 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Grammar of "X is Y"

Jay A. Kreibich wrote:
> On Tue, Oct 27, 2009 at 04:15:57PM +0000, Tom Sillence scratched on
the wall:
>> because I really want to write neat queries like:
>>
>> select col1 is col2 from table
> 
>   Are you sure?  You just want a result set of true/false values?

There's nothing wrong with that.  Booleans are values like anything
else, and 
one should be able to store them as field values and return them in
rowsets. 
And very useful in practice, when one considers all the facts one might
want to 
store that are commonly expressed as true/false, such as in a users
table column 
named "may_login" or "is_moderated". -- Darren Duncan
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to