[Toybox] bc style

Rob Landley rob at landley.net
Thu Mar 22 19:48:40 PDT 2018



On 03/21/2018 08:02 AM, Gavin Howard wrote:
> Rob,
> 
> In the interest of preventing a split between standalone and toybox
> bc's (when I submit it), I have a couple style questions.
> 
> First, about booleans. I have read your thoughts and the LKML post by
> Linus. I disagree with Linus, not because I don't think there are
> nuances (there are, but I have a good handle on them) but because I do
> believe they have good documentation value.
> 
> However, in that post, he said that he will never change someone
> else's code that uses booleans. Even though you linked to that post, I
> am not sure you would or not. And even if you wouldn't, I am not sure
> you wouldn't consider the bc submission (when it happens) to be your
> own code (for the purposes of booleans only, of course).

>From 12 years ago on another project:
http://lists.busybox.net/pipermail/busybox/2006-March/019622.html

> So once you get the bc, are you planning on removing booleans?

Probably, but I don't currently have it and am not looking at it again until
it's resubmitted?

> Second, how do you feel about asserts? As of right now, I am putting
> quite a few in to get rid of some status codes. Do you like having
> them? Do you want them gone?

See "I generally shy away from asserts" in:
http://lists.landley.net/pipermail/toybox-landley.net/2012-July/005530.html

And rule of thumb about other people's debug printfs at the end of:
http://lists.landley.net/pipermail/toybox-landley.net/2013-April/005822.html

> Gavin Howard

Rob



More information about the Toybox mailing list