Mark has been hanging around databases too long which always do cost based short-circuiting of some sort. They don't follow the same rules of conduct as other languages and don't even follow each other.
E.g. I think PostgreSQL will always resolve = and other operators etc first before functions regardless of order and then go left to right (8.3 adds a twist since you can put in a hint as to the cost of a function to change its behavior). This has bitten me on several occasions when I forgot that sometimes left to right is the rule of the day and sometimes it isn't. SQL Server does some random ordering which seems to follow no rhyme or reason at times although it does seem to slightly favor right to left short-circuiting. On very bizarre occasions it refuses to short-circuit at all when it obviously can. And of course great old VB.NET gives you an option - because maybe sometimes you don't want to short-circuit. E.g. you really want to carry out a costly call do a And b or c If you want the expensive b and c sometimes but short-circuit when you can do a AndAlso b orElse c Thanks, Regina -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Ramsey Sent: Thursday, April 10, 2008 6:23 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] 1.3.3 Pre-Release Notice My intuition that it worked left-to-right came from Perl... where'd your reverse intuition come from, Mark? (Languages are so multifarious...) On Thu, Apr 10, 2008 at 3:26 PM, Mark Cave-Ayland <[EMAIL PROTECTED]> wrote: > Fascinating. Being self-taught in C, it's always interesting to learn > something new - even if it does go against intuition :) _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users