Re:The search for easier safe systems programming
by kkukshtel on Thursday May 09, 2024 @11:33AM
(#40309289)
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.
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.