You don't like GC? Do you?

Atila Neves atila.neves at gmail.com
Sat Oct 13 13:17:41 UTC 2018


On Friday, 12 October 2018 at 23:35:19 UTC, Stanislav Blinov 
wrote:
> On Friday, 12 October 2018 at 21:39:13 UTC, Atila Neves wrote:
>
>> D isn't Java. If you can, put your data on the stack. If you 
>> can't, `new` away and don't think about it.
>
> Then five years later, try and hunt down that mysterious heap 
> corruption. Caused by some destructor calling into buggy 
> third-party code. Didn't want to think about that one either?

That hasn't happened to me.

>>> I mean come on, it's 2018. We're writing code for multi-core 
>>> and multi-processor systems with complex memory interaction.
>>
>> Sometimes we are. Other times it's a 50 line script.
>
> There is no "sometimes" here. You're writing programs for 
> specific machines. All. The. Time.

I am not. The last time I wrote code for a specific machine it 
was for my 386, probably around 1995.

>>> Precisely where in memory your data is, how it got there and 
>>> how it's laid out should be bread and butter of any D 
>>> programmer.
>>
>> Of any D programmer writing code that's performance sensitive.
>
> All code is performance sensitive.

If that were true, nobody would write code in Python. And yet...

> If it's not speed, it's power consumption. Or memory. Or I/O.

Not if it's good enough as it is. Which, in my my experience, is 
frequently the case. YMMV.

> "Not thinking" about any of that means you're treating your 
> power champion horse as if it was a one-legged pony.

Yes. I'd rather the computer spend its time than I mine. I value 
the latter far more than the former.

> Advocating the "not thinking" approach makes you an outright 
> evil person.

Is there meetup for evil people now that I qualify? :P

https://www.youtube.com/watch?v=FVAD3LQmxbw&t=42


More information about the Digitalmars-d mailing list