You don't like GC? Do you?
Stanislav Blinov
stanislav.blinov at gmail.com
Tue Oct 16 14:46:41 UTC 2018
On Tuesday, 16 October 2018 at 11:42:55 UTC, Tony wrote:
> On Monday, 15 October 2018 at 08:21:11 UTC, Eugene Wissner
>> He doesn't argue against garbage collection.
Thanks, Eugene, I was starting to lose hope in humanity.
> Well, can you state what he does argue against?
I did state what I was arguing against, if you actually read the
thread and not only pick select statements I'm sure you'll find
it.
> Wouldn't C++ or Rust, with their smart pointers, be a better
> choice for someone who wants to use a compiles-to-object-code
> language, but can't suffer any garbage collector delays?
What is up with people and this thread? Who is talking about
garbage collector delays? If you do use the GC, they're a given,
and you work with them. *Just like you should with everything
else*.
I'm talking about code that doesn't give a **** about utilizing
machine resources correctly. Crap out "new" everywhere, it lets
you write code fast. Is it actually a good idea to collect here?
Hell if you know, you don't care, carry on! Crap out classes
everywhere, it lets you write code fast. Pull in a zillion of
external dependencies 90% of which you have no idea what they're
for, what they do and how much cruft they bring with them, they
let you write code fast. Oh look, you have no threads! Maybe you
should write a, a... a task system! Yes, full of classes and, and
futures and... stuff. But no, nononono, writing is too long,
let's take a ready one. Implemented by another awesome programmer
just like you! And then spawn... ooooh, a second thread! Yes! Two
threads are better than one! What for? It doesn't matter what
for, don't think about it. Better yet! Spawn four! Six! Twelve!
And then serialize them all with one mutex, because to hell with
learning that task system you downloaded, you have code to write.
What did you say? Pointers? Nah, you have twelve threads and a
mutex. Surely you need reference counted objects. Pointers are
bad for you, they will have you think...
Then, after this jellyfish wobbly pile of crud is starting to
swell and smell, then start "optimizing" it. Profile first
though. Profile, measure! Only first write more cruft in order to
measure what needs to be measured, otherwise you might
accidentally measure all those libXXX you used and all those
cache misses you wrote. And then fix it. By doing more of the
above, as luck would have it.
"Don't be a computer..." What a joke.
More information about the Digitalmars-d
mailing list