dao
dao copied to clipboard
Array type inference is... unnatural
(dao) l = []
= [ ]
(dao) l = [1]
[[ERROR]] in file "interactive codes":
At line 0 : Invalid function definition --- " __main__() ";
At line 1 : Invalid virtual machine instruction --- " SETVG:1,2,0 ";
In code snippet:
1 : VECTOR : 0 , 1 , 1 ; 1; 1
>> 2 : SETVG : 1 , 2 , 0 ; 1; l
3 : RETURN : 1 , 1 , 0 ; 1; ]
At line 1 : Invalid operation on the type --- " l ";
At line 1 : Types not matching --- " 'array<int>' for 'array<none>' ";
(dao) l = [none]
[[ERROR]] in file "interactive codes":
At line 0 : Invalid function definition --- " __main__() ";
At line 1 : Invalid virtual machine instruction --- " SETVG:1,2,0 ";
In code snippet:
1 : VECTOR : 0 , 1 , 1 ; 1; [none]
>> 2 : SETVG : 1 , 2 , 0 ; 1; l
3 : RETURN : 1 , 1 , 0 ; 1; ]
At line 1 : Invalid operation on the type --- " l ";
At line 1 : Types not matching --- " 'array<float>' for 'array<none>' ";
This is grotesque. Why does this array<none> even exist? There shouldn't be any esoteric stuff here.