The page for functions says that some "properties can be executed at compile time", and it lists .length as one of those properties. Unfortunately it can only be accessed by reading it, but assigning a value to it is not possible.
For example:
char[] ctf()
{
// Create a table:
char[][] table = [];
// table.length = 250; // No simple enlargement.
// Use ugly workaround:
for (uint i; i < 250; i++)
table ~= [];
char[] code = "";
// Create code from table.
return code;
}
pragma(msg, ctf());
I think this shouldn't be too difficult to implement.