Post

VB10 vs VB6 (aka VFred vs Classic VB)

A couple of weeks ago there was a rumor that was flying around regarding VB6 being made open source. This was completely untrue; however, in the aftermath, the FUD machine has kicked back into gear.

A lot of this FUD can be traced to a single source… Karl E. Peterson. He created and “maintains” the VB.NOT and can be credited with the term VFred. This crusade of his, in my opinion, is directly or indirectly one of the main reasons why a lot of VB developers have decided stay with VB6, to find another platform altogether or, if they decided to move to .NET, decided to give C# a go “since it’s a whole new language to learn anyway”. It’s interesting to note that many of the features that VB has had all along are now being demanded by C# developers and my suspicion is that those whom are demanding these features are ex-VB developers.

In any case, I still use VB and will continue to use it as long as I can possibly do so. I think BASIC is one of the best languages out there and the fact that I’ve been able to utilize it for the past 30+ years stands as a testament to that fact.

I think that Karl should be following up on his list with each revision of VB and he, as best as I can tell, has not done so. So he helped create the mess and is unwilling to do anything to repair the damage he’s done. With that said, I’m going to address his original list by comparing VB10 to VB6.

To collect these together, I’ll be using the VB6 tag. This tag does not mean that I’ll be switching back to VB6. ;-) I’ve tried that a couple of times just for giggles and it’s pure torture to work in that IDE after more recent version of VB.

Before I get started, I have to point out a few things that he states on his site.

On the list he states:

“Before anyone spends hours writing “rebuttals” to the points below, it may help to understand the original purpose of this list. The points are not intended to highlight unintelligent design, in either Classic VB or VFred. Can that be said any clearer? The points are intended solely to demonstrate the enormity of incompatibility between Classic VB and VFred. That’s it. In a nutshell, there is no backward- or forward-compatibility, between the two languages.

Depending who you ask, each point below may be considered anywhere from “gratuitous” to “essential.” Either way, if the feature in question is one you used in Classic VB, you will need to address this change, and determine what, if any, workaround may be available. But the point is, the fact a workaround is necessary indicates somethings broken. That something, in this case, is your code/investment.”

So basically he is saying, “Hey, all of this is broken and there’s nothing you can do about it and Microsoft is going to do nothing about it. And don’t complain to me or try to correct me because, if any one item is different, it’s all bad.”

Furthermore, he states:

“So, without further ado, the bullets you will not see coming from Microsoft.”

Which, I think is irresponsible for the perspective that he obviously has not followed up on this list in the 5 versions (VB7.0, VB7.1, VB8.0, VB9.0 and VB10.0) that have been released since he created his original list. He created this list during the original VB7 BETA and updated it as of the second VB7 BETA. So his list doesn’t even reflect a released product; yet he still maintains the list and many people still refer to this list. Bottom line, it’s irresponsible to maintain such a list, evangelize such a list and read such a list without double checking the facts.

So, fine, don’t consider this a “rebuttal”; look at this as a “progress report”. It’s been about 10 years since this list was put together. My goal is not to point out how wrong it is. I will just be using it to point out where we are TODAY.

The following is a copy of his list as of 5/29/2011.

  • VarPtr is not supported available.
  • StrPtr is not supported available.
  • ObjPtr is not supported available.
  • 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.

This post will also serve as a table of contents; links will be updated on the list for items that are discussed.

This post is licensed under CC BY 4.0 by the author.