Recently, Eric Gunnerson posted code on how to create an array with a non-zero lower bound. Paul Vick brought up the AndAlso and OrElse operators which are new to VB.NET. This got me to thinking of the state of affairs way back in 2001 when .NET was still in its beta phase.
Three years ago, Visual Fred was the derisive name given to VB.NET 2002 by VB6 programmers who did not like the changes to the then forthcoming programming language. The VB6 programmers of the time had the sentiment that it really wasn't VB anymore, and perhaps should have been given a different name.
Microsoft did that when it created C#, but it kept VB as is. Much the same sentiment was probably voiced when people moved from C to C++ or from C++ to C#. Admittedly, my memory is hazy here.
I scanned through the list of concerns/complaints (reproduced below) with three years of hindsight to see if all the fuss really mattered. From my point of view, it didn't. Many of the items listed have simple substitutions in .NET. My evaluation is tempered by the fact that I did not have a huge investment in existing programs to maintain and upgrade. I have just one big one (EDR) out there in VB6. I thought at the time that both the discussion and the list was a bit overstated. I recall that several developers said they would no longer use VB and would switch to Delphi. (Hmmm, isn't Delphi object-oriented Pascal? It seems strange that people would switch away from OO VB to OO Pascal.)
This list comes from Karl Peterson's website. From the numerous nots in the list, you can guess Karl's position in the argument. Since there are so many ways to do things in .NET, the ultimate implication of the changes were not much. Several of the listed items were peeks into the behind-the-scenes way that VB6 did business. Everyone knows that it is a Bad Thing to continue to assume undocumented behavior will continue to be supported. They were convenient methods for a slick piece of code, or a small optimization, or even the only way to achieve a goal.
I guess much of the furor was because many of the items listed changed or removed many a favored programming feature. In the intervening years, we have found many ways of doing the same thing a different way. This implies that we have learned something in the intervening time. I see that as a good thing. Plugging away at the Same Old Thing, while potentially putting food on the table, is not continually emotionally satisfying, nor does it provide for keeping up with changing customer requirements.
As for the array issue mentioned above, it appears as #7 in the list below. The implementation is easy and can be adapted as required. The forthcoming VB 2005 will support generics which will make it even easier.
Popular myth has Microsoft's products achieving maturity at version 3. This happened with VB3 and again with VB6. The forthcoming Whidbey release will be called VB 2005, but it is essentially VB9. Perhaps it will be time for the new .NET to be considered mature.
- VarPtr is not
supportedavailable.
- StrPtr is not
supportedavailable.
- ObjPtr is not
supportedavailable.
- As Any is not supported for API Declares.
- Use of ByVal/ByRef directly within API calls is not supported.
- Private class variables are not private to the class instance.
- Arrays may not have a lower bound other than zero.
- Dynamic arrays are not allowed within structures (UDTs)
Arrays are not declared using the upper bound. (Addressed in Beta2)
- Option Base is not supported.
- Variants are not supported. Object is now the default data type.
- Currency is not supported.
- Dates are not stored internally as Double values.
- Longs are not 32-bits; they are 64-bits.
- Integers are not 16-bits; they are 32-bits.
True, coerced to an Integer, is not -1, but is 1 instead. (Addressed in Beta2)
- The Imp and Eqv operators are not supported.
- Fixed-length Strings are not supported.
- DefInt, DefLong, et al., are not supported.
- Dim may not always create procedure-level variables.
- Redim will not create arrays not already declared.
- Local variables are not necessarily visible (in scope) throughout a procedure.
- VarType is not supported.
- Empty is not supported.
- Null is not supported.
- IsEmpty is not supported.
- IsMissing is not supported.
- IsNull is not supported.
- IsObject is not supported.
- Let is not supported.
- Core language constants do not have a "vb" prefix (vbRed becomes Red).
- Terminate will not fire when an object's last reference is released.
- Object finalization code will not execute in a predictable order.
- Implicit object creation is not delayed until first reference.
- Public object variables are not safe from alteration when passed as parameters.
- Can not expose Property procedures with mixed visibility (Friend Set/Public Get).
- Procedure parameters are not by default passed ByRef anymore.
- ParamArray arguments are not passed ByRef anymore.
- Property parameters may not be passed ByRef anymore.
- Implements is not implemented the same, so must be rewritten.
- Static is not supported as a procedure level modifier.
- Use of As New does not force auto-reinstantiation when an object is released.
- Parenthesis are not optional when calling procedures.
- Set is not supported for object assignment.
- Parameterless default properties are not supported.
- Default values for Optional parameters are not optional.
- Code is not compiled to native, thus making decompilation much easier.
- Resource files have changed format and old ones are not supported.
- LSet is not supported.
- RSet is not supported.
- UDTs are not Types, but are called Structures instead.
- UDTs are not by default contiguous blocks of memory, but are objects.
- Enums will not be recognized unless fully-qualified.
- While/Wend loops are not supported.
- GoSub/Return is not supported.
- On/GoTo is not supported.
- On/GoSub is not supported.
- Line numbers are not supported. Labels may be numeric.
- Erl is not supported.
- The MsgBox function is not supported.
- The DoEvents function is not supported.
- The Date statement is not supported.
- The Time statement is not supported.
And, Or, XOr, and Not are not bitwise operators. (Addressed in Beta2)
Comparison operators are not evaluated before logical operators. (Addressed in Beta2)
- Sqr is not supported.
- Sgn is not supported.
- Atn is not supported.
- The String function is not supported.
- Control arrays are not supported.
- The native Forms collection is not supported.
- UnloadMode detection is not offered, as QueryUnload is history.
- ListBox controls do not offer an ItemData property.
- ListBox controls do not offer an NewIndex property.
- Windowless controls are not supported.
- Image controls are not supported.
- Shape controls are not supported.
- Line controls are not supported.
- OLE Container controls are not supported.
- Label controls will not have a Caption property.
The Tag property is not supported. (Addressed in Beta2)
- The ToolTipText property is not supported.
- The TextHeight property is not supported.
- The TextWidth property is not supported.
- Setting a Timer control's Interval to 0 does not disable it.
- Top-level menus may not be used as context menus.
- Old forms using vbPixels for Scalemode will not upgrade correctly.
- DDE is not supported.
- Circle is not supported.
- Cls is not supported.
- Line is not supported.
- PSet is not supported.
- Point is not supported.
- AutoRedraw is not supported.
- PrintForm is not supported.
- Scale is not supported.
The Name property for forms and controls is not exposed at runtime. (Addressed in Beta2)
- Print will not include a linefeed at the end of a line.
- File I/O will not be compatible, at all, and must be rewritten.
- Printer object methods are not automatically upgraded and must be rewritten.
- Clipboard object methods are not automatically upgraded and must be rewritten.
- The Err object is not shared between managed (.NET) and unmanaged (ActiveX) code.
- The App object is not shared between managed (.NET) and unmanaged (ActiveX) code.
- Screen.MousePointer does not have a direct replacement.
- Webclasses are not supported.
- DHTML projects are not supported.
- UserControl projects are not supported.
- ActiveX Document projects are not supported.
- The IDE Extensibility Model is not backwardly compatible.
- Run->Break->Edit->Continue development is not supported.
- The Immediate window will not work in Design mode.
- SDI will not be an option in the IDE -- MDI or nothing.
- Debug.Print is not supported.
- Debug.Assert is not supported.
- Data binding with DAO is not supported.
- Data binding with RDO is not supported.
- ...
- ...
- ...