[This post is part of a series, "wish-list for future versions of VB"]

 

IDEA: Add a #light directive, like F#, to reduce VB's verbosity. We already eliminated the dreaded "_" to make VB syntax look cleaner. We could also use layout as in Python and F#'s "light syntax" to be able to omit noise words like End Function, End Sub, End If, End Class, End Module -- they don't have any significance, especially since the IDE is hardcore about introducing intendation.

Module Module1

    Sub Main()

        Dim s = Console.ReadLine()

        If s = "" Then

            Console.WriteLine("you pressed enter")

        Else

            f(s)

 

    Sub f(ByVal s As String)

        Console.WriteLine("you wrote " & s)

 

Provisional evaluation from VB team: A new syntax for the language would be a MAJOR upheaval. In this case we don't think it brings enough benefit. In any case, we think that the new WPF-based VS2010 editor will be capable of achieving the same effect through plugins.