my issue is imagine getFoo changes types for some reason... something something legacy code ಥ_ಥ
anyways... with "var", the error will occur when accessing instead of when defining. this makes debugging harder but also introduces the risk of theoretical corruption when types are compatible but used differently.
View all comments
Show parent comment
1
u/T351A Mar 11 '23
my issue is imagine getFoo changes types for some reason... something something legacy code ಥ_ಥ
anyways... with "var", the error will occur when accessing instead of when defining. this makes debugging harder but also introduces the risk of theoretical corruption when types are compatible but used differently.