Re: Short-circuit warning
- Posted by Jason Gade <jaygade at ya?oo.com> May 20, 2008
- 627 views
Well, you /are/ making up silly examples. Short circuiting is not intuitive to people new to programming. Not everyone new to programming will have taken a class on it. Even reading the manual short-circuiting may not appear very clear to people who are new to boolean algebra. The least-surprise assumption is that both conditions are tested and then a decision is made. We only think differently because we're used to it. Now, short-circuiting is very useful. I still suggest "with/without strict" for the short-circuit warning and for the unused local vars warning. -- A complex system that works is invariably found to have evolved from a simple system that works. --John Gall's 15th law of Systemantics. "Premature optimization is the root of all evil in programming." --C.A.R. Hoare j.