Am 03.01.2010, 14:00 Uhr, schrieb bearophile <[email protected]>:

Trass3r:
Alternative 1: I heard struct literals could be removed.

I haven't heard that. They are recently changed a little, but you already know that from another thread.


I read somewhere it might conflict with function literals: {...}


Alternative 2:
1) it's cumbersome, especially if you got a huge array

But it's clean & readable, and more flexible because later you can add a static opCall that does what you want. You can use a Python script or an IDE to generate the D code.


I don't need to be flexible. In this simple case I only need a
reinterpret_cast.
A good language like D should provide a neat, clean way to accomplish that
without involving another language or tool (which in fact is already
supported but it simply doesn't work at compile-time that way)

Reply via email to