July 09, 2016
On Friday, 8 July 2016 at 22:25:37 UTC, Chris wrote:
> after Java. And D was invented when GC was expected by many people.

The GC was by far the most criticised feature of D...


> GC was a big selling point. Every Java book went on about how

Err... no, the big selling point that gave Java traction was portability and Java being marketed as designed for the internet and web. GC languages were already available and in use, but the JVM/.NET made it difficult for commercial development platforms. Portability and Microsoft's dominance was a big issue back then.


> blah ... Apple even added GC to Objective-C to appease the GC crowd.

Apple removed the GC rather quickly for the same reasons that makes GC a bad choice for D. And replaced it with automatic reference counting.

July 09, 2016
On Saturday, 9 July 2016 at 07:52:57 UTC, Ola Fosheim Grøstad wrote:
> removed the GC
...
> replaced it with automatic reference counting.

you *do* know that refcounting *is* GC, do you? ;-)
July 09, 2016
On 7/8/2016 2:36 PM, Luís Marques wrote:
> On Friday, 8 July 2016 at 21:26:19 UTC, Walter Bright wrote:
>>> Only on Windows, and that's a common source of frustration for me :(
>>
>> Linux too.
>
> Not by default, right?

-g

July 09, 2016
On Saturday, 9 July 2016 at 07:52:57 UTC, Ola Fosheim Grøstad wrote:
> On Friday, 8 July 2016 at 22:25:37 UTC, Chris wrote:
>> after Java. And D was invented when GC was expected by many people.
>
> The GC was by far the most criticised feature of D...
>
>
>> GC was a big selling point. Every Java book went on about how
>
> Err... no, the big selling point that gave Java traction was portability and Java being marketed as designed for the internet and web. GC languages were already available and in use, but the JVM/.NET made it difficult for commercial development platforms. Portability and Microsoft's dominance was a big issue back then.
>

Yes, of course the "write-once-run-everywhere" fairy tale helped to spread Java, but while it was gaining traction GC became a feature everybody wanted. Sorry, but there is not a single book or introduction to Java that doesn't go on about how great GC is. Java was the main catalyst for GC - or at least for people demanding it. Practically everybody who had gone through IT courses, college etc. with Java (and there were loads) wanted GC. It was a given for many people.

>> blah ... Apple even added GC to Objective-C to appease the GC crowd.
>
> Apple removed the GC rather quickly for the same reasons that makes GC a bad choice for D. And replaced it with automatic reference counting.

Yes, it didn't last long. But the fact that they bothered to introduce it, shows you how big GC was/is.
July 09, 2016
On Saturday, 9 July 2016 at 08:06:54 UTC, ketmar wrote:
> On Saturday, 9 July 2016 at 07:52:57 UTC, Ola Fosheim Grøstad wrote:
>> removed the GC
> ...
>> replaced it with automatic reference counting.
>
> you *do* know that refcounting *is* GC, do you? ;-)

And that's a very important point, because the choice of RC vs other types of GC ignores the fact that they're both GC, and old school programmers didn't want anything to do with a "feature" that would slow down their code. RC would have been an even worse choice when D started because it is [claimed to be] slower than other types of GC. It's been a long time now, but I don't recall many arguments against Java's GC because of pauses. The objection was always that it would make the code run more slowly.
July 09, 2016
On Saturday, 9 July 2016 at 11:10:22 UTC, bachmeier wrote:
> The objection was always that it would make the code run more slowly.

i tend to ignore such persons completely after such a claim: they are obviously incompetent as programmers.

i also tend to ignore whole "@nogc" movement: it is just a failed marketing strategy, which (sadly) tends to consume alot of recources even today.
July 09, 2016
On Saturday, 9 July 2016 at 11:10:22 UTC, bachmeier wrote:
p.s. also, it is funny that D's GC is actually *better* if one to avoid GC completely, yet people continue to ask for refcounting.

i meat: if i don't want to use GC in D, it is as easy as avoid `new` (and delegates with closures). any code that processing allocated objects, but never allocates itself doesn't need to be changed at all.

and with refcounting i have to *explicitly* mark all the code as "no refcounting here", or accept refcounting overhead for nothing.
July 09, 2016
On Saturday, 9 July 2016 at 11:10:22 UTC, bachmeier wrote:
> On Saturday, 9 July 2016 at 08:06:54 UTC, ketmar wrote:
>> On Saturday, 9 July 2016 at 07:52:57 UTC, Ola Fosheim Grøstad wrote:
>>> removed the GC
>> ...
>>> replaced it with automatic reference counting.
>>
>> you *do* know that refcounting *is* GC, do you? ;-)
>
> And that's a very important point, because the choice of RC vs other types of GC ignores the fact that they're both GC, and old school programmers didn't want anything to do with a "feature" that would slow down their code. RC would have been an even worse choice when D started because it is [claimed to be] slower than other types of GC. It's been a long time now, but I don't recall many arguments against Java's GC because of pauses. The objection was always that it would make the code run more slowly.

I remember reading an article by Apple about their GC in Objective-C and they said that it was a generational GC and that some objects would not be collected at all (if too old), if I remember correctly. Apparently it wasn't good enough, but that's about 7 years ago, so my memory might have been freed of some details :-)
July 10, 2016
On Saturday, 9 July 2016 at 08:06:54 UTC, ketmar wrote:
> On Saturday, 9 July 2016 at 07:52:57 UTC, Ola Fosheim Grøstad wrote:
>> removed the GC
> ...
>> replaced it with automatic reference counting.
>
> you *do* know that refcounting *is* GC, do you? ;-)

Reference counting is a technique for collecting garbage, but the term «garbage collection» is typically used for techniques that catch cycles by tracing down chains of pointers:

https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)#Tracing_garbage_collectors

July 10, 2016
On Saturday, 9 July 2016 at 11:10:22 UTC, bachmeier wrote:
> On Saturday, 9 July 2016 at 08:06:54 UTC, ketmar wrote:
>> On Saturday, 9 July 2016 at 07:52:57 UTC, Ola Fosheim Grøstad wrote:
>>> removed the GC
>> ...
>>> replaced it with automatic reference counting.
>>
>> you *do* know that refcounting *is* GC, do you? ;-)
>
> And that's a very important point, because the choice of RC vs other types of GC ignores the fact that they're both GC, and old school programmers didn't want anything to do with a "feature" that would slow down their code. RC would have been an even worse choice when D started because it is [claimed to be] slower than other types of GC.

No, manual reference counting is not particularly slow. Automatic reference counting is also not considered to be slower than GC.

Reference counting is not capable of catching cyclic reference, which is why garbage collection is considered to be a more general solution to the problem.

This is pretty much 101 memory management.