[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: in defense of C
In article <542@fsu.scri.fsu.edu> pepke@gw.scri.fsu.edu (Eric Pepke) writes:
|In the one I am now writing for the 680x0, one can have
|safe CARs and CDRs without loss of speed.
|So, one just makes that a test for
|(1) a valid list, or (2) anything else. In my system, that's testing a
|single bit. In case 1, do the job. In case 2, return NIL.
|Eric Pepke INTERNET: pepke@gw.scri.fsu.edu
But this is NOT safe: consider the following code:
(defun foo ()
(if (car 3)
(tear-down-the-berlin-wall)
(bomb-the-soviets)))
Your implementation will bomb the soviets! I understand that your
implementation will not crash due to garbage pointers, but I
don't think "safe" is a good term to apply here.
John
gateley@m2.csc.ti.com
- References:
- Re: in defense of C
- From: "lawrence.g.mayka" <att!cbnewsc!lgm@bloom-beacon.mit.edu>
- Re: in defense of C
- From: Jeff Dalton <mcsun!ukc!edcastle!aiai!jeff@uunet.uu.net>
- Re: in defense of C
- From: Eric Pepke <zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!uflorida!mephisto!prism!fsu!gw.scri.fsu.edu!pepke@think.com>