Website message overhaul

Timon Gehr timon.gehr at gmx.ch
Sat Nov 19 12:49:10 PST 2011


On 11/19/2011 06:32 PM, Paulo Pinto wrote:
> Hi,
>
> the code below is what I managed to achieve, but I
> do conceed that the D code looks better.
>
> Regarding the efficiency of native code in other languages,
> do you consider efficiency the hability to do low level tricks
> with the language or generating proper native code?
>
> I have been developing applications in last 10 years in high level
> languages and very seldom required to do low level tricks to achieve
> what I consider efficient code.
>
> Regarding your example I would rather write a software rasterizer or
> code using SIMD instructions or a GPGPU language.
>
> The cast trick you did although quite handy, is the type of language
> feature that prevents D to use advanced GC algorithms.
>

The fact that Nicks example works has no implications for the GC 
implementation because the two types involved in his reinterpret-casting 
don't have any indirections.

Furthermore:

int* a =...;
int  b = cast(int)a;
int* c = cast(int*)b;
// assert(a == c); // not guaranteed!

The language allows the GC to move around heap data.
What kind of GC would be impossible to implement?


More information about the Digitalmars-d mailing list