problems/risks due to programming language

Jim Harkins jharkins at sagpd1.UUCP
Thu Mar 8 11:44:32 AEST 1990


In article <2905 at goanna.oz.au>, ok at goanna.oz.au (Richard O'keefe) writes:
> : defined.  That means that you can have a statement which you meant to have
> : in the if statement but isn't."  You know, something like
> :   if (a == b)
> :        bar(a);
> :        foo(a);
> :   a++;
> : Do you propose making an editor macro to handle ifs to prevent this?

How do you know he didn't really mean

	if (a == b)
		bar(a);
	foo(a);
	a++;

Of course, the a++ is probably a dead givaway but in the real world the 
examples are seldom so.  Basically, you either have a programming error
(solution: install brackets) or a stylistic error (solution: delete the
unwanted tab).  I for one like the flexibility to format my code the way
I like it, if I do something stupid and the code doesn't work as expected
it's my fault, not the language's.


-- 
jim		jharkins at sagpd1

"My hope is that we can use tariffs to force Japan to open their markets to
 imported goods.  My fear is I'll be forced to buy lousy American made stuff."



More information about the Comp.lang.c mailing list