3 ms·
I agree with your points except for For i as Int32 = 1 to 10 There is nothing loose or unambiguous about type inference Dim i = 10 is absolutely unambig
by cm2187 10y ago
I agree with your points except for
For i as Int32 = 1 to 10
There is nothing loose or unambiguous about type inference
Dim i = 10
is absolutely unambiguous, strongly typed and elegant. The For i = 1 to 10 is just doing the same in a loop.
- Jaruzel 10y agoI think I had gotten stung previously with VB6s loose typing (everything as a generic object unless declared otherwise), so when I switched to VB.NET I made a point of declaring everything (and still do).
- cm2187 10y agoyeah it took me a while to get rid of bad VB6 habits too. Hungarian notation, specifying byval in front of every arguments in a function, not relying on type inference, etc.