3 ms·
You're right! I remember some session where they talked about wanting to infer a natural type for stuff like that but its obviously a big question. But as you s
by kkukshtel 2y ago
You're right! I remember some session where they talked about wanting to infer a natural type for stuff like that but its obviously a big question. But as you said declaring the type directly allows it to work. However the other nice part is that you _can_ do this:
void myFunc(List<int>){}
myFunc([1,2,3]);
The expression sytanx can infer the type from the caller syntax so you can just inline the array declaration.