Monthly Archives: July 2007

lowercase keywords?

One of the raps that VB sometimes gets is that we’re too “verbose.” There are a few things that we think might contribute to this perception that we’re looking at for the future, but I had an interesting flash the other day. I wonder how much the fact that we uppercase our keywords affects our perception? So I built a bootleg of the compiler and tried it out on some code of mine. Before:

        Private Function ParseSimpleNameExpression() As SimpleNameExpression
            Dim start As Token = Peek()
            Dim name As SimpleName = ParseSimpleName(False)
            Dim typeArguments As TypeArgumentCollection = Nothing

            If Peek().Type = TokenType.LeftParenthesis Then
                Dim leftParenthesis As Token = Read()

                If Peek().Type = TokenType.Of Then
                    typeArguments = ParseTypeArguments(leftParenthesis, False)
                Else
                    Backtrack(leftParenthesis)
                End If
            End If

            Return New SimpleNameExpression(name, typeArguments, SpanFrom(start))
        End Function

After:

        private function ParseSimpleNameExpression() as SimpleNameExpression
            dim start as Token = Peek()
            dim name as SimpleName = ParseSimpleName(false)
            dim typeArguments as TypeArgumentCollection = nothing

            if Peek().Type = TokenType.LeftParenthesis then
                dim leftParenthesis as Token = Read()

                if Peek().Type = TokenType.Of then
                    typeArguments = ParseTypeArguments(leftParenthesis, false)
                else
                    Backtrack(leftParenthesis)
                end if
            end if

            return new SimpleNameExpression(name, typeArguments, SpanFrom(start))
        end function

It’s a little frightening how much just changing the casing of our keywords makes us suddenly look like C#, at least to my eyes. I’m curious what people think of the idea? Would you like to see us switch to lowercase keywords? Provide an option?

(My replies to this entry maybe a bit slow–I’m going to be on vacation for a little while, but something to think about while I’m gone…)

VB and Dynamics

From eWEEK:

Another big hit with SL 7 is the fact that it’s the first suite in the Dynamics pantheon to be rewritten in .Net.

“We cheated a little bit. It was in Visual Basic, so using Microsoft tools we moved from Visual Basic to Visual Basic .Net,” said Jon Pratt, senior director of Microsoft’s Dynamics GP, Dynamics SL and Dynamics Retail Management System. The .Net rationale is that it “extremely improves the enhancement of the developer environment,” said Pratt. It also paves the way for much easier on-demand development by providing a multitier architecture that’s native, according to Pratt. (Microsoft will release an on-demand version of its customer relationship management suite, code-named Titan, later this year. The company has declined to comment on whether it will build on-demand versions of its ERP suites.)

Cheat away!