What's left for 1.0?
Kyle Furlong
kylefurlong at gmail.com
Fri Nov 17 21:10:19 PST 2006
Bill Baxter wrote:
> Bill Baxter wrote:
>> So, what's left on everyone's lists for D1.0 must-have features?
>
> For a language that has unheard of features like variadic template
> support (!) one thing that seems oddly immature to me is support for
> static initializers. Things like:
>
> * No way to initialize a static array without counting elements
> static byte[???] imageData = [...]; // i hope you like counting!
>
> * No way to initialize a dynamic array with a known length
> byte[] imageData; imageData.length = 5; // two steps - meh
>
> * No way to initialize array of strings
> char[][] list = ["eggs","bacon","milk","break"]; //uh uh
>
> * No way to initialize non-static struct
> Point p = { x:1.0, y:2.0 }; // nope...not static
>
> * No way to initialize associative array
> char[int] strTable = {"hello":5, "hi":2, "greetings":9}; // no way
>
>
> I know things have gotten much better since the old days, when there
> weren't even array literals (yikes!), but it still looks pretty
> primitive in some ways compared to C.
>
> --bb
I agree this has been in the past and still is a weak point.
More information about the Digitalmars-d
mailing list