Some thoughts on VB9

J

Justin Weinberg

My thoughts on this....

http://msdn.microsoft.com/vbasic/Future/default.aspx?pull=/library/en-us/dnvs05/html/vb9overview.asp


My thoughts:

1. Regarding Implicit types, I don't use type declaration for the benefits
of performance. It's for the benefit of clarity of purpose when reading
code. The first thing I do with neophyte developers is turn Option Strict
On to help them understand why they do what they do. With this, I can't
stop people from writing garbly gook.
2. No conflcit on XLING. I may not use it, but it doesn't hurt anything,
and there could be real beneifts to it.
3. Nullable types. I think this is a really good idea if it integrates
with SQL Server well.
4. I think I will like the Query Comprehension features, because I think it
makes understanding certain intents clearer.
5. "Because extension methods are intended mostly for library designers,
Visual Basic does not offer direct language syntax support for declaring
them." - This kind of comment has always bugged me, and probably rubs all VB
developers who are serious about the language wrong. It reveals a "red
headed stepchild" attitude toward the language, as if C# is the "real
thing". If you really talked to VB developers in the field, I would imagine
what they want more than anything is just a one to one feature set with C#.
But this aside, I don't really like the extension concept because it feels
too much like multiple inheritance and might have similar issues associated
with it in terms of maintainability of code.
6. Nested functions I can see real benefits to, but it does make VB feel
quite a bit like ML. But this could really go along way to making some
things really easy to understand.
7. Relaxed Delgates. Dislike this for the same reason I don't like
implicit type conversion.
8. Dynamic interfaces. Ditto.
9. Dynamic identifiers. More of the same.

I guess my conclusion is I like some, but overall because of the
destruction of clear typing, I have to give it a thumbs down. These sorts
of things should be done sparingly in clear code, so sparingly that
programmers should have to understand the intricacies of reflection before
they are given a license to do them. I feel VB9 legislates bad habits and
practices we gave up prior to VB.NET.

My gut tells me that this is really all about upgrading the tremendous share
of VB5 and VB6 users to .NET who so far not made the transition. I imagine
upgrading a VB6 application to VB9 will be much simpler than any other .NET
upgrade prior. But for those of us who have made the transition, I think
the lack of typing is bad policy. It may simply be time for me to byte the
bullet on curlies and semicolons
 
B

Bob Lehmann

this is really all about upgrading the tremendous share of VB5 and VB6
users to .NET
Not to mention all the DotNet 2001, 2003, 2005 users who have already dished
out thousands of $$$ trying to keep up with MS's "Developers!, Developers!,
Developers!" non-backwards-compatible treadmill.

Bob Lehmann
 
M

Martin

Seems to me MS is going in the wrong direction.... Accomodating the huge VB6
developing community is something they should have started with, and make
things a bit stricter with every succeeding release.
 
G

Guest

Very thoughtful analysis, Justin. I'm also against implicit types, and I
propose instead an autocomplete enhancement. The programmer types in
dim xxx = "abc"
and based on the initializer, autocomplete yields
Dim xxx As String = "abc"
In this way, the resulting source code will be understandable months later,
and the programmer has yet another shortcut. Perhaps applicable to anonymous
types as well.
 
G

Guest

The problem VB has now is that Microsoft is puzzled about all the VB6
developers who haven't upgraded and their solution is starting to be a
slightly desperate "give them whatever they want".

The catch is that developers who haven't upgraded to .NET yet are likely to
be the ones who most love the VB6 "let me forget to type in half the details
and let the compiler sort it out" philosophy.

So the result is that we already have implicit form instances (no, most VB6
developers don't know what that means, but they certainly know that they
don't want to type one line to instantiate a form instance). In VB9 we'll
have implicit variable types (again, most VB6 developers don't know what that
means, but they certainly know that they don't want to have to think about
variable types). I know that there are some intelligent argument for
implicit types, but that is not what is driving the implicit variable types
initiative at Microsoft.
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter & VB to C++ converter
Instant J#: VB to J# converter
 
C

CMM

I agree. If the VS2005 TableAdapter (which harkens back to the Data Access
methodology of the 90's), and the My namespace, and Code Snippets tool
doesn't entice them, there's no hope. I say forget them.

VB doesn't need to get dumber. It needs to get smarter... and cooler- as I
explain in another post in this thread.
 
C

CMM

A Document Outline for code that displays #regions as well as groups members
by type (Methods, Properties, etc). I saw at the Feature Request Labs that
this is
already in the pipeline but I'm not sure how many people have voted on it.
Done right, this would be awesome.

Smarter Code insertion. I don't use #Regions very much (I find them to be
unwieldy given the lack of a Document Outline mentioned above) BUT I do like
to keep
related types of methods near each other in the file... like all my Property
Accessors at the top and all my Event Handlers towards the end of the file.
When I double click on a Control I'd like the code to be inserted near other
event handlers.... not in the (seemingly) random way it's inserted now.

Visual Attributes Editor. Attributes (or at least a common set of them)
should show up in the Properties Toolbox (or something similar... like the
way Code Snippets appear) when the cursor is positioned on the
Method/Function/Property name line. I can never remember the exact syntax of
the oodles of attributes that I often want to apply to a property.

Refactoring in VB2005 is pretty lame. I like the right-click "Rename" symbol
feature but that's pretty much the extent of refactoring in VB2005. The 3rd
party free Refactor! Lite tool MS touts as a workaround is OK... but I'd
like to see this as part of VB proper.

Super-Smart Find. Regular Expressions is cool... but Find is still pretty
dumb. I'd like to be able to search by Type- (Find Next
"System.Windows.Forms.Control" reference).

Probably no other thing will the give the VB community a slap in the *ss as
a good set of Coding Standards Recommendations from MS. No, public Object
Model recommendations is not enough. This would go a long way to helping VB
achieve the same level of respect given to other development languages. It
is for good reason that VB developers have a bad rep.... because we tend to
write bad code because we feel like it and because we can. Open up two
different applications from two different VB developers and you will see
WILDLY different code standards.... this makes maintaining VB programs a
NIGHTMARE.... and it is for sure a BIG reason corporations are trying to
move away from VB and to C#.
 
C

CMM

Oh yeah. And I totally agree with Justin's initial comments. I'd go further
and say Implicit types will be VB's death-knell. MS, I think, has gone
insane in the last two years.... they're like a chicken without head not
quite sure about what they should be doing. IMHO Soma Somasgar needs to
goooooooo.

There's so many more things they could be spending time to improve instead
of this (like a good Visual Editor for Databinding rather than the
cumbersome dropdown combo methods of today, better WebForm Designer, better
more intuitive Visual Editor for Localization via Resources rather than
bug-ridden unweildy combo dropdown editor we have today, etc etc).

I could go on.

P.S. I like LINQ and XLING though. That seems truly innovative.
 
M

Martin

The catch is that developers who haven't upgraded to .NET yet are likely
to
be the ones who most love the VB6 "let me forget to type in half the
details
and let the compiler sort it out" philosophy.

So the result is that we already have implicit form instances (no, most
VB6
developers don't know what that means, but they certainly know that they
don't want to type one line to instantiate a form instance). In VB9 we'll
have implicit variable types (again, most VB6 developers don't know what
that
means, but they certainly know that they don't want to have to think about
variable types).
</SNIP>

"Most VB6 programmers" are not that dumb and/or messy...
 
M

Martin

The only thing on my wish list for VB2005 are a couple of bug-fixes, maybe a
additional control or two (MDI Tabs perhaps) and most important: Decent help
documentation!
 
G

Guest

Sorry for the blanket statement - too rash.
I'll revise those statements to read "the VB6 developers who Microsoft seems
to be listening to" instead of "most VB6 developers".

It's the VB6 developers who are clamoring for implicit types who probably
don't know the meanings of these terms.
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter & VB to C++ converter
Instant J#: VB to J# converter
 
C

CMM

MDI Tabs. http://www.cflashsoft.com/progs/mdiwinman/ It's free and source
code included.
Yeah, the Help contents... especially in VS2005 seems to have been written
by robot... or simply dumped using a tool like NDoc. It's plain unhelpful. I
find way more pertinent information using Google than using the gigabytes
and gigabytes of VStudio Help and MSDN.

--
-C. Moya
www.cmoya.com

Martin said:
The only thing on my wish list for VB2005 are a couple of bug-fixes, maybe
a additional control or two (MDI Tabs perhaps) and most important: Decent
help documentation!
 
C

CMM

I agree. I think the VB community had sorted out all those "bad practices"
by the late 90's and early 2000 or so. But not all. I've met MANY genius
(genius!) VB developers who wrote good (great!) code. However, because of
VB.Classic's easy entry-level, there were many (many!) bad programmers who
actually got well paying jobs and ended up producing a lot of the horrible
crapola of VB programs that folks like me need to come in and
upgrade/maintain/port. I think those guys formed about 75% of the *entire*
VB developer base (from students to pros).

Microsoft doesn't need to take a step back now. I think the learning curve
of VB.NET is GOOD. It helps to weed out those kiddie-programmers who gave
VB.Classic the rep it is still trying to live down to this day.

Just my (admittedly condescending) 2c.
 
M

Martin

Yup, I've seen and downloaded that MDI tabs control, you did a great job
there.


CMM said:
MDI Tabs. http://www.cflashsoft.com/progs/mdiwinman/ It's free and source
code included.
Yeah, the Help contents... especially in VS2005 seems to have been written
by robot... or simply dumped using a tool like NDoc. It's plain unhelpful.
I find way more pertinent information using Google than using the
gigabytes and gigabytes of VStudio Help and MSDN.
 
C

CMM

It's a work in progress. The tab window switching works well I think. Now
I'm working on perfecting some of the other esoteric options like the Aux
window.... as some of the properties conflict with each other (for instance
AutoHide, doesn't resize the Aux Window when the WindowManagerPanel hides
itself). If you have any comments or suggestions, by all means.
 
C

CMM

Why thanks! I'm working on fixing the logic that deals with making changes
at runtime... like the AutoHide and Orientation clashing with each other and
stuff. I'd like to get it real nice and super-stable so I can kinda leave it
be for a while. ;-)
 
L

Larry Lard

CMM said:
Oh yeah. And I totally agree with Justin's initial comments. I'd go further
and say Implicit types will be VB's death-knell.

Why will implicit local variable typing kill VB but not C# ?
 
C

CMM

Why will implicit local variable typing kill VB but not C# ?

I don't know how to answer that without offending anyone.

I fear in five years I'll be opening a big VB application at some bank and
see a huge mess of code with nothing but implicit type declarations..... I'd
go crazy! I'm sure Implicit Types have their place... like when used in
conjunction with LINQ. But, VB developers are going to abuse it... I just
know it.

For the most part (and I know this may be an over-generalization) but C#
developers are more disciplined and adhere to more structured sets of
standards than do VB developers.... the language practically demands it.
It's lack of background compile- and thus full real-time full syntax
checking and full intellisense- (I won't even get into the reliance on
delegates and non-intuitive event handling) just force you to be. VB may be
easier to approach... easier to maintain... but, also A LOT easier to muck
up. VB has a bad rep that it has just in the last four years begun to live
down. I can smell that rep coming back.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top