Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 May 1997 21:42:54 -0700
From:      "Jordan K. Hubbard" <jkh@time.cdrom.com>
To:        Steve Howe <un_x@anchorage.net>
Cc:        "Kevin P. Neal" <kpneal@pobox.com>, freebsd-hackers <hackers@FreeBSD.ORG>
Subject:   Re: Borland 16bit bcc vs cc/gcc (float) 
Message-ID:  <10742.865140174@time.cdrom.com>
In-Reply-To: Your message of "Sat, 31 May 1997 19:10:53 -0800." <Pine.BSF.3.95q.970531190322.1359C-100000@aak.anchorage.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
> own stack.  further, from what i gather, it's good to call exit() on a 
> real OS when you finish a program in case there a hidden/extraneous
> clean-up functions that need to be completed.  and since exit doesn't

Uh, this is all just a shameless attempt at
justification-after-the-fact, I'm sorry. ;-)

Calling exit() gratuitously when you're not explicitly trying to
indicate a short-cut is just bad programming style and any
instructions gained are more than offset by the general obfuscation
added by calling exit() on any grounds other than "we really need to
bail out NOW", which is the more general interpretation of it in the
field.  Main returns a value, OK?  Get used to it. ;-)

Also, as others have pointed out, you won't call the destructions for
things which are going out of scope in main() if you just call exit()
in a C++ program, so it's also a pretty evil habit to get into just on
the grounds of transition shock alone.

Please, there are impressionable youngsters on this mailing list and
I'll thank you to keep your odd C perversions hidden away in private,
where they belong! ;-) :-)

					Jordan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?10742.865140174>