logoalt Hacker News

tialaramexyesterday at 11:03 PM2 repliesview on HN

But why though? What is the purpose of the immutable "dynamic" array in your D?

We're unavoidably going to learn at compile time how big the array is, and knowing how big it is will always be the same or better, so we should always do that.


Replies

WalterBrighttoday at 12:22 AM

If you know at compile time what the size should be:

    int[f().length] array;
should do it.