On Monday 22 May 2006 17:54, you wrot > You can consider short-circuiting of Boolean evaluation greedy, but it a > feature which may also save clock cycles if the right-most sub-expressions > are costly to evaluate. > thanks to all for the responses! what a great list!!
using the links and explanations provided, i was able to determine that php short-circuits evaluation (aka lazy evaluation): http://ca3.php.net/manual/hk/migration.booleval.php which is nice to know since i was thinking of rewriting some code (but now don't need to). i was puzzled reading something on one of the wikipedia links provided: "The opposite of lazy evaluation is eager evaluation, also known as strict evaluation. Eager evaluation is the evaluation behavior used in most programming languages." http://en.wikipedia.org/wiki/Lazy_evaluation it would seem to me that lazy evaluation makes more sense than eager evaluation since it is both more logical and economical. i do not know much about language interpretation or compilation processes, but how can it possibly be of any advantage to do 2 things when you can get away doing just one? so why would 'most programming languages' NOT use it? there must be some benefit eager evaluation offers despite what seems to be a lack of efficient evaluation. is eager evaluation easier to design or implement perhaps? -- In friendship, prad ... with you on your journey Towards Freedom http://www.towardsfreedom.com (website) Information, Inspiration, Imagination - truly a site for soaring I's

