Hi,
I actually didn't want to post the following, but as the thread has been
picked up again I pulled it out of my template folder...
I have also worked with previous VB versions, but now I can ask the VB6
users:
- Where is inheritance? I want to add features and encapsulate my code where
it belongs to. Where is code reusage without (slow) delegation? How can I
inherit from interfaces?
- How can I structure big project without the availability of nested
namespaces? I didn't succeed while trying to keep expressive names. How can
I break the 39 chars ProgID length limit?
- Where is Option Strict? It helps me finding errors ASAP. The VB.NET
compiler found errors in upgraded DLLs that the VB6 compiler didn't find.
- Where are delegates? How can I store safe procedure pointers?
- How can I use the same event procedure for several controls *and* give
each control an expressive name?
- How can I overload methods? It's easier than using Add1, Add2, Add3, ...
- How can I overload declares? These "As Any" declarations can be dangerous.
- How can I use window subclassing without crashing the IDE when pressing
the stop button?
- How can I handle all the events that are not available in the nice combo
at the top of my code editor?
- How can I override WndProc?
- How can I enjoy free threading?
- How can I declare variables at block level? I can keep the names short
because of the narrow scope.
- Are there no OrElse or AndAlso keywords? Do I have to write nested
If..Then-s?
- How can I use keywords as names in code? I'd like to add a "Stop" method
to my class.
- How can I get rid of the default instance of all the Forms? Public
variables can be dangerous.
- Where are constructors? Some programmers, including myself, forgot to call
the Init sub after object creation. It shouldn't happen but it does.
- Why are my simple property-get procedures not optimized inline? Why are
even my public fields converted to property procedures? That's slowing down
things considerably.
- Why is there no garbage collection? COM reference counting can als slow
down things.
- Where is the type safety? It can be dangerous making the wrong Declare
statements. I'm usued to safely access C# assemblies from my VB.NET app.
- Why can I ReDim an array that hasn't been declared? That can be dangerous.
- How can I create an empty array? Redim x(0 to -1) does not work.
- How can I create nested classes?
- Why does the compiler not check whether the rank of two arrays match? I
could pass a one-dimensional array to a procedure taking a two-dimensional
array. => runtime error instead of compile error
- As there is no GC, how can I avoid the loss of memory occupying and
circulary referenced objects when removing a root reference?
- Where are the operators += -= and so on? Not a big deal but a little bit
less to type and a little bit safer.
- How can I freely create the structure of menus at runtime?
- It is not really intuitive to type "-4" in the procedure properties to get
an enumerable object.
- How can I create my own pens and brushes to avoid them being internally
created and destroyed more often than needed?
- How can I make Forms and other "instrinsic" objects public?
- How can an MDI container and it's children be contained in different
assemblies (without SetParent hacks that can also be dangerous)?
- Is there no Char or Long data type? Is the Decimal type only available as
Variant sub type?
- Is there no Return statement that can also return the function return
value?
- Why can't I use "Me.member" for private members to be able to use
intellisense?
- How can I pass a reference to an array to another object and have it store
the reference at class level?
- Why does the following expression return "False"? I expect the same object
is returned twice:
Printers(0) Is Printers(0)
- Why is the datatype name of a control array "Object"? Strange...
Debug.Print Typename(command1) 'command1 is a control array.
- Why do I get error 91 in the second line? Command1(index) *is* a
CommandButton.
Private Sub Command1_Click(Index As Integer)
Dim cmd As CommandButton
cmd = Command1(Index)
End Sub
- What strange syntax is this:
pic.line (0,0) - (100, 100), vbWhite, BF
Why not always separate arguments by a ","? What is BF? A string? A
constant or what?
- Why can't I write ".Line..." within a With block?
- Where are all the useful classes and new methods that are now available in
the Framework?
- Why does my IDE crash when my app crashes? Running in two processes is
much safer.
Comments:
- Items are in no specific order. Items are more or less important.
- These are only the items that I am personally interested in and that
spontaneously came into my mind.
- I do not say that all items are impossible in previous versions, but often
(a programmer's) life was really a lot harder.
- There are also several drawbacks now - but I don't dare to post them
*here*.
Some of them would be IDE things anyway.
- It is not required to answer the questions above. - I also won't
discuss them (at) all. ;-))