Re: [PATCH] Use NULL instead of integer 0 in security/selinux/

From: Timothy Miller
Date: Thu Jul 15 2004 - 10:52:49 EST




Andreas Schwab wrote:
Timothy Miller <miller@xxxxxxxxxxxxxx> writes:


Denis Vlasenko wrote:

The question is, whether readers of your code (including compiler)
will be able to be sure that there is no error in
f(a,b,c,d,e,0,f,g,h);
statement or not. Better typecheck that 0.

This I agree with, definately. It's very important to make your code
readable, and if it's not obvious from context, make it obvious. Cases
like the above are one of the reasons I like languages like Verilog where
you can pass parameters by specifying the parameter name.


If your function needs nine arguments it is not readable by
definition. :-)


Yeah... unfortunately, in chip design, you can't really avoid that. VHDL has structures which allow you to aggregate different signals, but Verilog doesn't have that feature, so you end up with hundreds of module parameters sometimes. That's when pass-by-name really pays off.

But then again, everything you know about software development is completely goes out the window when doing chip design. (i.e. in C, less code usually produces better results. The opposite is true in Verilog.)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/