I’d propose that the language permit functions to both accept and return arrays of fixed size via parameters characterized as dynamic.
At present, for example if the function signature is
function getKeys() public pure returns(string memory)
A return value of
return ["key1", "key2"];
won’t compile due a type error (string not compatible with string), which is both surprising and extremely inconvenient making it very difficult for example to use library functions which will work on arrays of varying sizes.
I would propose that either function parameters or return values specified as someType memory accept or return values of either fixed or dynamic type.
If it is important (for reasons I don’t completely understand) to discriminate between dynamic arrays and fixed arrays of arbitrary size, maybe the syntax could be that
returns(string memory) could be limited to functions which return dynamic arrays (as current) , and
returns(string[?] memory) only returns fixed arrays but of any arbitrary size.