dynamic-walls-demo
dynamic-walls-demo copied to clipboard
Var
Hello,
Is there a reason why you are not using var?
Hello aloisdg :) I am in love with typing variables, that's why :D There is no other reason. I was PHP programmer and not typing variables was pain in the ass (in PHP 5).
Also, I'm pretty new to C# (I have started this project on the end of September 2019)
In C# it is quite idiomatic to rely on var nowadays. Note that var is not dynamic. The type is still here and your intellisense should treat it as the correct type. it is a sweet sugar. :)
Coming from Groovy where variables can be defined with def, I still prefer using the type. This way the code is clearer from the reader's perspective, plus it is more compatible with static code analysers.