Hi Steven On 10 December 2010 03:50, Steven D'Aprano <st...@pearwood.info> wrote:
> Some languages (Pascal comes to mind) doesn't have short-circuit behaviour > at all. > Don't mean to nit pick, but in my experience it really depends on the compiler implementation and which version of Pascal you're talking about. Certainly, Borland's Turbo Pascal had and later Object Pascal (today called Delphi) has to this day short-circuit evaluation as default behaviour, although you can turn this off via a compiler switch if you want. (And as an aside, according to wikipedia ISO Pascal actually also allows but does not require support of short-circuit boolean evaluation.) It really depends on what your program does -- if your program contains functions with side-effects (a bad idea, but if it does) then short-circuit evaluation will probably break your code. On the other hand, not having short-circuit boolean expression evaluation can in most programming contexts be needlessly inefficient. Anyway, your general point is of course quite correct, so feel free to ignore my ramblings... Best, Walter
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor