I personally got used to the convenience of a case insensitive language and I usually write throw away scripts/analysis more than systems, where having a language you can type fast with few bugs is important. For that purpose VB.net is fantastic.
I personally got used to the convenience of a case insensitive language and I usually write throw away scripts/analysis more than systems, where having a language you can type fast with few bugs is important. For that purpose VB.net is fantastic.
VB.Net is a horrible language that lets developers get away with some really awful practices. The fact that the various Options are still present, and not on by default, is a recipe for disaster. That this is legal:
Sub Main dim x as boolean = false ''or true... dim y as integer = 0
select case y case x Console.Write("What does this even equate to???") end select End Sub
end case
or that this is legal:
Class SomeArgs
Inherits EventArgs
public Property Message as String
End Class
Class HorribleCode
Public Event Blah(ByVal sender As Object, ByVal e As Someargs)
Public Sub Doit()
RaiseEvent Blah(Me, new SomeArgs with { .Message = "Wow... YUCK!!!!"})
End Sub
End Class
Public WithEvents ThisSucks As HorribleCode
Public Sub ThisReallyWorks(ByVal sender As Object, ByVal e As Someargs) Handles ThisSucks.Blah
System.Console.WriteLine(e.Message)
End Sub
Sub Main()
Dim h As New HorribleCode
ThisSucks = h
ThisSucks.Doit()
End Sub
Yes, I dealt with code that had both of those "techniques" in it... ugh.The second example was mainly because the off shore coders didn't realise AddHandler/RemoveHandler existed... le sigh
In fact I must say one of the things that I appreciate the most about VB, beside case insensitivity is the IDE. I think c# is catching up now but the VB IDE is incredible in term of how much help you get, immediate feedback on what went wrong, rich auto-completion of code.