On Wednesday, 9 January 2013 at 09:17:35 UTC, Dmitry Olshansky
wrote:
09-Jan-2013 12:54, Mehrdad пишет:
On Wednesday, 9 January 2013 at 08:51:47 UTC, Paulo Pinto
wrote:
On Wednesday, 9 January 2013 at 08:28:44 UTC, Mehrdad wrote:
On Wednesday, 9 January 2013 at 08:14:35 UTC, Walter Bright
wrote:
On 1/8/2013 11:42 PM, Mehrdad wrote:
(True, it wouldn't give you the power of a systems
language, but
that's quite
obviouly not my point -- the point is that it's a
_perfectly possible_
memory-safe language which we made, so I don't understand
Walter's
comment about
a GC being "required" for a memory-safe language.)
The misunderstanding is you are not considering reference
counting
as a form of GC. It is.
So you would say that C++ code (which uses reference
counting) uses
garbage collection?
Yes.
You (or Walter I guess) are the first person I've seen who
calls C++
garbage collected.
That's a stretch - IMHO I'd call the language garbage collected
iff it is the default way language-wise (e.g. if C++ new was
ref-counted I'd call C++ garbage collected).
This way D is garbage collected language because the language
default is GC.
I was being provocative on purpose.
Having said that, a C++ application where *_ptr<> + STL types are
used everywhere can make C++ almost a safe language.
Unfortunately most C++ libraries make use of naked pointers.
..
Paulo