Completing C code with D style

forkit forkit at gmail.com
Wed Nov 10 23:15:09 UTC 2021


On Wednesday, 10 November 2021 at 22:17:48 UTC, russhy wrote:
> On Wednesday, 10 November 2021 at 06:47:32 UTC, forkit wrote:
>> btw. My pc has 24GB of main memory, and my CPU 8MB L3 cache. 
>> So I really don't give a damn about allocations .. not one 
>> little bit ;-)
>

> Having the right mindset helps not make these mistakes in the 
> future
>
> Changing habits is hard, make sure to train yourself to pick 
> the right one, early if possible

Umm.. you kinda missed the last part of my post...

..where I said..'Now if I were running a million processes across 
1000's of servers, I probably would give a damn.'

C'mon... nothing in my code was 'unacceptable' in terms of speed 
or efficiency.

Making code transformations to improve speed and efficieny are 
important, but secondary. A newcomer cannot improve code that 
they do not understand ;-)

Picking understandable code first, IS right.

In any case, I say again, this thread is not about writing 
performance code per se, but about presenting code to new-comers, 
that they can make some sense of.

Taking some C code, and writing/presenting it in D (or 
vica-versa) in such a way that you can longer make any sense of 
it, is kinda futile.

I doubt the original op will ever come back to D, after seeing 
some of those examples that were provided ;-)



More information about the Digitalmars-d-learn mailing list