On Tuesday, 22 November 2016 at 00:08:05 UTC, ketmar wrote:
On Monday, 21 November 2016 at 23:49:27 UTC, burjui wrote:
Though I would argue that it's better to use '_' instead of '$' to denote deduced fixed size, it seems more obvious to me:

int[_] array = [ 1, 2, 3 ];

alas, `_` is valid identifier, so `enum _ = 42; int[_] a;` is perfectly valid. dollar is simply most logical non-identifier character.

We can define static array without counting the elements as following:


enum array_ = [1u,2,3,4];
uint[array_.length] static_array = array_;

Reply via email to