Re: Short-circuit warning
- Posted by Jeremy Cowgar <jeremy at co?g?r.com> May 20, 2008
- 675 views
Matt Lewis wrote: > > Yes, they are, but if the part that is being short circuited has side effects, > you may not really want to short circuit. I think that was the real reason > for the warning. And it's still valid. I think we probably should keep it, > but we might be able to improve it by eliminating cases where we can prove > that there are no side effects. I haven't studied that part of the code, > so I'm not sure how feasible this is. > I would say that it would be very difficult to analyze that. Here's an example of where I get short-circuit warnings that are flooding the output making it hard to even see the output of my program: if in_if or re:matches(else_if, line) then ... elsif in_continue and length(line) > 5 and equal(line[1..5], ...) ... end if I guess that's the way I have always programmed. I wonder, maybe we should add something like:
without xyz_warning
?? -- Jeremy Cowgar http://jeremy.cowgar.com