Ts,ts,毁了一切。 但这是真的。 C和C ++被用于很多控制软件。 想象一下核电站。想象一下,反应堆内有一个故障 。进一步想象一下,你的软件已检测到故障,并将以有序的方式关闭反应堆 时尚。该软件已经等待,直到没有其他选择来关闭并且它知道这可能是时间关键的。软件 启动关机过程....然后垃圾收集器启动。 说:C ++足够强大,有垃圾收集器周围。 如果您觉得需要使用它,只需谷歌。 - Karl Heinz Buchegger kb******@gascad.at On Fri,05 Dec 2003 02:06:54 +1100,Rick< rrquick @ nospam-com>写道: 我的问题是..如果Lisp,一个40岁的语言支持垃圾收集,为什么没有C ++的作者为这种语言选择垃圾收集?这背后有根本原因吗?是因为 C通常是一种低级语言,他们不希望垃圾收集进入C ++并破坏一切吗? 只是想知道: )Rick 我,我不想和GC有任何关系,谢谢!那天C ++ 迫使我加油,如果必要,我会继续前往汇编。 Rick< rrquick @ nospam -com>在留言新闻中写道:< 3f ******** @ clarion.carno.net.au> ... 我的问题是。如果Lisp,一个40岁的语言支持垃圾收集,为什么C ++的作者不会为这种语言选择垃圾收集?这背后有根本原因吗?是因为 C通常是一种低级语言,他们不希望垃圾收集进入C ++并破坏一切吗? 只是想知道: )Rick 为什么不问Bjarne Stroustrup博士:) http://www.research.att.com/~bs/ bs_f ...年龄集合 Hi,My question is.. if Lisp, a 40 year old language supports garbagecollection, why didn''t the authors of C++ choose garbage collection forthis language? Are there fundamental reasons behind this? Is it becauseC is generally a ''low level'' language and they didn''t want garbagecollection to creep into C++ and ruin everything?Just wondering :)Rick 解决方案 Rick wrote: Hi, My question is.. if Lisp, a 40 year old language supports garbage collection, why didn''t the authors of C++ choose garbage collection for this language?You have to ask Mr. Stroustroup on this one.He has written a book about why C++ looks and acts the way it does.Locate his website, I think there is a description of that book. Are there fundamental reasons behind this? Is it because C is generally a ''low level'' language and they didn''t want garbage collection to creep into C++ and ruin everything?Ts, ts, ruin everything.But it''s true. C and C++ is used a lot controlling software.Imagine a nuclear power plant. Imagine that there is a malfunctionwithin the reactor. Further imagine that your software has detectedthat malfunction and is going to shut down the reactor in an orderlyfashion. The software has waited until there is no other choice toshutdown and it knows that this may be time critical. The softwarestarts the shutdown process .... and then the garbage collector kicks in.That said: C++ is powerful enough that there are garbage collectors around.Just google for them if you feel the need to use one.--Karl Heinz Buchegger kb******@gascad.atOn Fri, 05 Dec 2003 02:06:54 +1100, Rick <rrquick@nospam-com> wrote: Hi,My question is.. if Lisp, a 40 year old language supports garbagecollection, why didn''t the authors of C++ choose garbage collection forthis language? Are there fundamental reasons behind this? Is it becauseC is generally a ''low level'' language and they didn''t want garbagecollection to creep into C++ and ruin everything?Just wondering :)RickI, for one, don''t want anything to do with GC, thanks! The day C++forces GC on me, I''ll move on to Assembler if I have to.Rick <rrquick@nospam-com> wrote in message news:<3f********@clarion.carno.net.au>... Hi, My question is.. if Lisp, a 40 year old language supports garbage collection, why didn''t the authors of C++ choose garbage collection for this language? Are there fundamental reasons behind this? Is it because C is generally a ''low level'' language and they didn''t want garbage collection to creep into C++ and ruin everything? Just wondering :) RickWhy don''t you ask Dr Bjarne Stroustrup :) http://www.research.att.com/~bs/bs_f...age-collection 这篇关于垃圾收集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 07-30 22:36