shared array?
Prudence via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Sep 13 10:14:05 PDT 2015
On Sunday, 13 September 2015 at 16:58:22 UTC, Ola Fosheim Grøstad
wrote:
> On Sunday, 13 September 2015 at 15:35:07 UTC, Jonathan M Davis
> wrote:
>> the GC heavily. And the reality of the matter is that the vast
>> majority of programs will have _no_ problems with using the GC
>> so long as they don't use it heavily. Programming like you're
>> in Java and allocating everything on the heap will kill
>> performance, but idiomatic D code doesn't do that, and Phobos
>> doesn't do that. Far too many programmers freak out at the
>> thought of D even having a GC and overreact thinking that they
>> have to root it out completely, when there really is no need
>> to. Plenty of folks how written highly performant code in D
>> using the GC. You just have to avoid doing a lot of allocating
>> and make sure you track down unwanted allocations when you
>> have a performance problem.
>
> I don't understand this argument. Even if the GC heap only
> contains a single live object, you still have to scan ALL
> memory that contains pointers.
>
> So how does programming like you do in Java affect anything
> related to the GC?
>
> Or are you saying that finalization is taking up most of the
> time?
The problem is that these people arguing that the GC is the holy
grail simply use statistics for their reasoning. They pigeon
everyone in the same box they exist in, and you find out it's
useless to argue with them because their logic is flawed.
What if I happen to write a RT app that happens to use a part of
phobo's that happens to heavily rely on the GC? Am I suppose to
use -vgs all the time to avoid that? Do I avoid phobo's because 3
functions in it use the GC? Am I suppose to memorize a table of
all the places phobo's uses the GC and then roll my own to avoid
them?
The fact is, that the proponents of the GC such as JMD do not
write RT apps and could care less bout that aspect. This is why
they make such easy claims. For them, RT is just theoretical
mumbo jumbo that doesn't exist in the real world. The GC is,
also, for them, a safety blanket so they can be lazy and not have
to keep track of all the things they should be. This type of
mentality seems to run rampet in the contributors of D. They
simply cannot understand the perspective of the other side(or
refuse to).
Statistics has nothing to do with facts. The fact is, for a hard
real time app, the GC and it's stop the world behavior is a no
go. As long as the mentality exists that the GC is good enough
because it 99% of phobo's doesn't use it or 99% of apps don't
need RT, or whatever, D will never be as powerful as it can be.
Basically, I know you need your snotty safety blanket and it
works for you, but I don't want to use it! Don't force me! I
won't force you to give up your blanket but don't force me to use
it. The road goes both ways, stop trying to make it one way.
(The argument is fundamentally different. They want to exclude, I
want to include)
Of course, the real issue is, that it will take someone that has
the opposite point of view from them to actually do anything
about it, because it's obvious they won't work the direction they
think is a waste. So, ultimately, it's people like me that have
to step up and actually do the work. I am hesitant because it's
always an uphill battle with such people. Instead of working
together, they have to make it a struggle. (it's always "Why are
you trying to take my safety blanket away!!! wa, wa wa" and tears
follow)
More information about the Digitalmars-d-learn
mailing list