垃圾收集? [英] Garbage collection?

查看:81
本文介绍了垃圾收集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我的问题是..如果Lisp,一个40岁的语言支持垃圾

收集,为什么不是作者C ++为这个语言选择垃圾收集来支付
?这背后有根本原因吗?是因为

C通常是一种低级语言而且他们不想要垃圾回收到C ++而毁掉一切?

只是想知道:)


Rick

解决方案

Rick写道:




我的问题是..如果Lisp,一个40岁的语言支持垃圾收集,为什么没有' C ++的作者为这种语言选择垃圾收集?


你必须要问Stroustroup先生这个。

他写了一本关于为什么C ++看起来和行为方式的书。

找到他的网站,我想有一本关于那本书的描述。

这背后有根本原因吗?是因为
C通常是一种低级语言,他们不希望垃圾收集进入C ++并破坏一切吗?



Ts,ts,毁了一切。


但这是真的。 C和C ++被用于很多控制软件。

想象一下核电站。想象一下,反应堆内有一个故障

。进一步想象一下,你的软件已检测到故障,并将以有序的方式关闭反应堆

时尚。该软件已经等待,直到没有其他选择来关闭
并且它知道这可能是时间关键的。软件

启动关机过程....然后垃圾收集器启动。


说:C ++足够强大,有垃圾收集器周围。

如果您觉得需要使用它,只需谷歌。


-

Karl Heinz Buchegger
kb******@gascad.at


< blockquote> 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 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 :)

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 malfunction
within the reactor. Further imagine that your software has detected
that malfunction and is going to shut down the reactor in an orderly
fashion. The software has waited until there is no other choice to
shutdown and it knows that this may be time critical. The software
starts 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.at


On 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 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 :)

Rick



I, 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 :)

Rick



Why don''t you ask Dr Bjarne Stroustrup :)

http://www.research.att.com/~bs/bs_f...age-collection


这篇关于垃圾收集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆