[openbeos] Re: Asserts?

  • From: Scott Mansfield <thephantom@xxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Fri, 4 Oct 2002 17:31:53 -0700

On Friday, Oct 4, 2002, at 08:53 America/Los_Angeles, shatty wrote:

I think a reasonable way to do this is to flank those
asserts with debug macros.

Asserts are already macros. They are also are a bit pernicious in that if you don't want them compiled into your code, you must define NDEBUG somewhere (I usually do it in C(PP)FLAGS). It's too easy to not define NDEBUG for a release build and be surprised (embarassed?) when your supposedly production-quality code starts assertin'...

Yes, I speak from personal experience. :-)

Do we have a standard set that we should be using?

None that I've been able to find, but I'm still pretty new to the OBOS project.

Perhaps someone can go over the
archives and gather a set of coding guildlines that go
beyond just the opentracker ones.

Coding guidelines? Nothing like starting a jihad in the same vein as vi vs. emacs, even though emacs sucks^H^H^H^H^His inferior, so there's no point in discussing that one further. ;-)

I've gathered from other discussions on the lists that a coding standard is something we need, but I'm definitely not qualified to take that beyond opinion because I'm so new to OBOS. I would be willing to take on the task of collecting the data and writing a proposal if no one objects--I've done it before in a previous job where I was the "keeper of all things needed to write and build code" which included owning the coding standard. Also depends on how big my next "code finisher" task is (which Michael is keeping secret from me for now so I get my lazy butt motivated and finish libnetapi).


Other related posts: