Added by dholton dholton
class A: def constructor(): if false: print "nothing" assert false A()
The code above will not assert false because a space is hidden inside the indentation tabs. The best way in my opinion to handle this situation is to eliminate spaces as indentation altogether, but an alternate situation would be to stop indentation from working in the case that spaces and tabs are mixed. Convert s=="" to s.Length==0, apparently it is faster, but also warn if user did not also check that s is not null. I also put this suggestion on the Boo Optimizations page. Check for if/elif/while statements that have parentheses around the entire conditional, e.g. if (i == 2):. If a return type is specified, ensure a return statement is used. Boo silently inserts a "return null" otherwise: http://jira.codehaus.org/browse/BOO-418
fxCop might have some other ideas for things boo could check.
Back to Home
Last edited by rollynoel,