By Peter Coffee  |  Posted 2005-12-05 Print this article Print

Basic disagreements

Developers who think of Visual Basic as a container for their own intellectual property have objected to the idea that the semantics of their chosen language are subject to significant change in the interest of tracking Microsofts platform evolution. Its clear, though, in Visual Studio 2005 that Microsoft hasnt changed its mind about that doctrine—and that the company recognizes the continuing need to assuage the offended Visual Basic 6 community.

Visual Studio 2005s online documentation includes extensive discussion of the transition from Visual Basic 6 to Visual Basic 2005—more than a little odd, considering that Visual Basic 6 was, in theory, left behind three years ago, but Microsoft isnt letting pride get in the way of pragmatically admitting that many Visual Basic 6 developers didnt make the .Net move.

How big are the differences between Visual Basic 6 and Visual Basic 2005? For coders, theres nothing more fundamental than bitwise (Boolean) logic, and Visual Studio 2005 changes the vocabulary of operators that are available for bit-by-bit comparison of data values. The Visual Basic 6 logical implication operator Imp disappears in Visual Basic 2005, with instructions to replace any use of Imp with a logically equivalent expression combining the operators Not and Or. At least this change can be made by a simple substitution based on patterns of text, unlike some of the language changes.

Much less automatic is the question of whether a developer should replace any given use of the Visual Basic 6 And or Or operators, which evaluate all their arguments, with the Visual Basic 2005 alternatives AndAlso or OrElse: The latter variants stop evaluating arguments as soon as the value of a composite expression can be determined, speeding execution but altering behavior when expression evaluations have side effects.

For example, as soon as an AndAlso encounters an argument thats false, it knows that the truth or falsity of other arguments isnt going to change the falsity of the returned result. It can therefore "short-circuit" that evaluation (as this practice is commonly known), but this means that a subsequent argument to the AndElse operator wont always be evaluated. If that argument is an expression that has a side effect, such as altering the value of a variable, then this represents a change in program behavior.

Other issues for the Visual Basic 6 developer range from changes in the values of system-level constants to the disappearance of traditional control-flow statements such as On...GoSub—changes that have led some protesting developers to dub the current language Visual Fred, arguing that its a fine and modern language, but it isnt Basic.

Developers in any language should consider the similar question: "Is Visual Studio 2005 the tool that I want?" Microsoft offers developers a comprehensive, impressively choreographed environment for building a broad variety of applications that include both rich clients and Web services. Its up to developers to look in the shadows as well as admire whats deservedly in the spotlight of this high-profile debut.

Next page: Evaluation Shortlist: Related Products.

Peter Coffee is Director of Platform Research at salesforce.com, where he serves as a liaison with the developer community to define the opportunity and clarify developersÔÇÖ technical requirements on the companyÔÇÖs evolving Apex Platform. Peter previously spent 18 years with eWEEK (formerly PC Week), the national news magazine of enterprise technology practice, where he reviewed software development tools and methods and wrote regular columns on emerging technologies and professional community issues.Before he began writing full-time in 1989, Peter spent eleven years in technical and management positions at Exxon and The Aerospace Corporation, including management of the latter companyÔÇÖs first desktop computing planning team and applied research in applications of artificial intelligence techniques. He holds an engineering degree from MIT and an MBA from Pepperdine University, he has held teaching appointments in computer science, business analytics and information systems management at Pepperdine, UCLA, and Chapman College.

Submit a Comment

Loading Comments...
Manage your Newsletters: Login   Register My Newsletters

Rocket Fuel