473,837 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

To VB or not to VB?

A co-worker where I work is proposing all future code devopment be done
in Visual C#. Here is his assessment of VB:

VB.NET is hack as far as the CLR(Common Language Runtime) goes. It was
retrofited into the .Net framework for those people who simply don't,
and do not care to, understand object oriented programming. Quite a
few of it's (features) were forced into the language through very ugly
means to make it easier for the VB guys to bring in their code. Things
like "static" veriables and functions are called "shared" in VB.NET,
because the keyword static was already used in VB6. VB.NET is loaded
with these kinds of little idiocies.

Any comment?

Jan 5 '06
62 5212
> <Ma***********@ feedback.micros oft.com> wrote
Ease of migration is a huge, huge goal for us -- always has been, and will
continue to be.

Jonathan West wrote: I have to say the evidence for that hasn't been terribly clear. After all,
you allowed VB6 to go off mainstream support before you brought out VS2005,
which you say has migration as its primary mission.


Gotta say -- I love VB.Net as a language, as demonstrated in my
previous
post, but what Jonathan West wrote about migration is right on the
money.
Even the migration from 16-bit Visual Basic to 32-bit Visual Basic
wasn't
nearly as difficult as the migration from VB6 to VB.Net.

What people say about making VB.NET comparable to C# is
understandable. Not all, but most features of C++ and/or C# are
available in
some form in Visual Basic. Meanwhile, there are quite a few features
from
VB6 that are simply gone. For me, control arrays is the most difficult
loss...
some of my VB6 projects that didn't even need to use control arrays,
did
so because there was no reason not to. (For instance, why pick names
for every label on your form? Didn't even think about it until I had
to, when
converting to VB.NET...)

Overall, the language is better than it used to be. But conversion is
much
more important than the Microsoft VB Team seems to think it is, and you
guys dropped the ball on this one.

Feb 4 '06 #61

"Ken Halter" <Ken_Halter@Use _Sparingly_Hotm ail.com> wrote in message

I have to say, I don't have much sympathy for keeping "the current
architecture". I mean, sheesh.... look at the amount of work it takes >us<
to migrate a simple app. The man hours spent on a decent migration tool is
time well spent, no matter how you look at it. If it takes a year to
re-write... but saves the end user a "man century" in their migration
attempt, I'd say "Go for it!".
They don't understand, and they don't care.
I guess the wizard does "Ok" for the "Out of the box" code/controls but
who uses those? <g> In its current condition, I'd classify it as a "Snip
converter" and not much more.


The real problem now is that even if they somehow created a "perfect"
wizard, how can I have confidence that they won't pull this same stunt again
in a release or two. They are NOT through cleaning up the language. They
still don't respect it.

It was a great ride. It's over.

Dan

Feb 4 '06 #62

<al*****@my-dejanews.com> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
: Just to be fair...
:
: _AnonCoward wrote:
:
: > If var1 = 1 Then
: > For Index = 0 to 10
: > If var2 = Index Then
: > DoThis
: > Else
: > Select Case var3
: > Case "A"
: > DoThisToo
: > Case "B"
: > DoThisInstead
: > End Select
: > End If
: > Next
: > End If
: >
: > compared to:
: >
: > if(var1 == 1){
: > for(Index = 0; Index < 11; Index++){
: > if(var2 == Index){
: > DoThis();
: > }else{
: > switch(var3){
: > case "A":
: > DoThisToo();
: > break;
: > case "B":
: > DoThisInstead() ;
: > break;
: > }
: > }
: > }
: > }
: >
: >
: > I personally like the VB examples as being cleaner and easier to read -
: > the curly braces in particular can be very confusing when you have
: > deeply nested logic. VB isn't without its difficulties in this respect,
: > but at least you can more quickly know if you're looking at the close
: > of an IF-THEN block or a SELECT-CASE block.
:
: But in C# most of those braces are optional. You could just as easily
: have written
:
: if(var1 == 1)
: for(Index = 0; Index < 11; Index++)
: if(var2 == Index)
: DoThis();
: else
: switch(var3) {
: case "A":
: DoThisToo();
: break;
: case "B":
: DoThisInstead() ;
: break;
: }
Yes, as long as there aren't any mutliline statements. The following
statements are not equivalent

if(test == 1)
doThis();
doThat();

if(test == 1)
{
doThis();
doThat();
}
I personally find it irritating to read C# code (or Java or JavaScript) that
doesn't consistently use curly braces. From my perspective it allows for
bugs to be introduced because a programmer inadvertantly fails to allow for
the fact that both lines are to be constrained by the conditional, not just
the first line. When I write in C# (infrequently) or JavaScript (very
frequently), I always use curly braces for just that reason (even single
statements). If I need to add a new statement to an existing code block, I
already have defined the limits of the conditional. If in the example you
offer I needed to also include an additional function call inside for loop
once the second conditional has been evaluated, I'll need to make the
following changes
if(var1 == 1)
for(Index = 0; Index < 11; Index++)
{
if(var2 == Index)
DoThis();
else
switch(var3) {
case "A":
DoThisToo();
break;
case "B":
DoThisInstead() ;
break;
}
doThisforEachLo op();
}
To do this, I had to spend some effort figuring out just where exactly the
for loop and second conditional statements were finished. That is time
consuming and potentially error prone as I may misread the original code. If
the {} were all ready in placed, the change would have been much simpler and
more likely to be correct the first time out.
: > But of course that is a purely subjective opinion based
: > on years of experience with VB versus C or its derivatives. C++ or Java
: > programmers would likely prefer the C# examples.
:
: Yes, I agree.
:
: > Further, the VB compiler is tolerant of the occasional wrong use of case
: > (e.g.: for Index as integer = 0 to 100 complies without issue, just as
: > it should). Sometimes, knocking out some quick code as a test is
: > helpful. You can dispense with worrying about caps in VB - but C#
: > (and C/C++ and Java) throw a fit if you type Console.WriteLI ne instead
: > of Console.WriteLi ne - how ridiculous is that?
:
: But Intellisense makes this unlikely... in either language, you'd type
: Console.W, and use the up-and-down arrows to select WriteLine.
Agreed, if you are using intellisense. However, I sometimes bang out code in
a small module using notepad and the vbc or csc compilers. In C#, I have to
make sure I don't screw up my case statements. Further, intellisense only
goes so far and case errors do in fact creep in when using C# that would be
overlooked in VB.
: > Another problem with case sensitivity is that it can lead to the
: > introduction of hard to find bugs. For example, say you have two
: > variables myVar and myvar in a C# function. It is easy to accidentally
: > type myvar when you meant myVar (and vice versa) and locating the
: > inappropriate variable name can waste time that a VB coder doesn't
: > have to worry about.
:
: Sure, but the opposite problem exists with VB... if I try to declare
: two variables myVar and myvar in VB, I get an error:
: Local variable is already declared in the current block.
: It's all a matter of mindset. To be a good VB programmer, you have
: to think in VB; to be a good C# programmer, you have to think in
: C#. If a VB programmer thinks in C#, then even after all of the syntax
: and logic errors have been fixed, the code will "look" wrong... and
: vice-versa.
Yes, I agree. In the end, it's what you are used to and comfortable with.
: > (And let's
: > not even discuss how many times using = instead of == in logical
: > compares causes hours of wasted man hours trying to figure out why
: > a function isn't working correctly...)
:
: Yeah, that can be a problem.
:
: > When all is said and done, VB.net and C# are just languages - each do
: > pretty much the same things. Both languages bring strengths and
: > weaknesses to the table and neither is inherently better than the
: > other - it usually comes down to personal preference as to which
: > language is used.
:
: Yes.
:
: > Frankly, it sounds like your co-worker is a language bigot.
:
: But this is nothing new. Ever since there were two "high-level
: languages" (COBOL and Fortran), there have been people sneering
: at others who used the "wrong" language. They were wrong then,
: too.
:
: Back in the days of Visual Basic 3, the choice between the two
: languages was much more fundamental. There was a basic
: tradeoff -- VB was considered by most knowledgable people to
: be the "Rapid Development" system because it was easy to
: throw a few controls onto a form and wire them together. But
: VB programs loaded and executed much more slowly. If your
: program had to load and run quickly or use fewer resources,
: or if you wanted to accomplish things that couldn't be done in
: VB, then C++ was the way to go. On the other hand, it usually
: took a lot longer to get a C++ program written and debugged.
:
: This distinction is gone now. Almost every significant
: capability in either language has been added to the other,
: and they now have the same back-end (.NET). There are
: probably a few exceptions, but for most business programs,
: developers knowledgable in either language should take
: about the same amount of time to develop and debug the
: program, and they should be virtually identical when running.
: This is excellent for managers -- they can now pick a language
: based on what type of talent they have available, rather than
: having to do research about which development environment
: is more appropriate and then searching for someone competent
: in that language.
Yes. The different .net languages are very close to one another. I prefer
VB.net in part because I believe it is a better contruct but mostly because
I come vrom a VB6 background. Thanx for the input.
Ralf
--
--
----------------------------------------------------------
* ^~^ ^~^ *
* _ {~ ~} {~ ~} _ *
* /_``>*< >*<''_\ *
* (\--_)++) (++(_--/) *
----------------------------------------------------------
There are no advanced students in Aikido - there are only
competent beginners. There are no advanced techniques -
only the correct application of basic principles.
Feb 5 '06 #63

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
11260
by: William C. White | last post by:
Does anyone know of a way to use PHP /w Authorize.net AIM without using cURL? Our website is hosted on a shared drive and the webhost company doesn't installed additional software (such as cURL) on the server because of that. Our site will have an SSL certificate next week, so I would like to use AIM instead of SIM, however, I don't know how to send data via POST over https and recieve data from the Authorize.net server over an https...
2
5860
by: Albert Ahtenberg | last post by:
Hello, I don't know if it is only me but I was sure that header("Location:url") redirects the browser instantly to URL, or at least stops the execution of the code. But appearantely it continues to execute the code until the browser send his reply to the header instruction. So an exit(); after each redirection won't hurt at all
3
23047
by: James | last post by:
Hi, I have a form with 2 fields. 'A' 'B' The user completes one of the fields and the form is submitted. On the results page I want to run a query, but this will change subject to which field is completed.
0
8504
by: Ollivier Robert | last post by:
Hello, I'm trying to link PHP with Oracle 9.2.0/OCI8 with gcc 3.2.3 on a Solaris9 system. The link succeeds but everytime I try to run php, I get a SEGV from inside the libcnltsh.so library. 354 roberto@ausone:Build/php-4.3.2> ldd /opt/php4/bin/php libsablot.so.0 => /usr/local/lib/libsablot.so.0 libstdc++.so.5 => /usr/local/lib/libstdc++.so.5 libm.so.1 => /usr/lib/libm.so.1
1
8617
by: Richard Galli | last post by:
I want viewers to compare state laws on a single subject. Imagine a three-column table with a drop-down box on the top. A viewer selects a state from the list, and that state's text fills the column below. The viewer can select states from the drop down lists above the other two columns as well. If the viewer selects only one, only one column fills. If the viewer selects two states, two columns fill. Etc. I could, if appropriate, have...
4
18313
by: Albert Ahtenberg | last post by:
Hello, I have two questions. 1. When the user presses the back button and returns to a form he filled the form is reseted. How do I leave there the values he inserted? 2. When the user comes back to a page where he had a submitted POST data the browser keeps telling that the data has expired and asks if repost. How to avoid that? I tried registering all POST and GET vars as SESSION vars but
1
6882
by: inderjit S Gabrie | last post by:
Hi all Here is the scenerio ...is it possibly to do this... i am getting valid course dates output on to a web which i have designed ....all is okay so far , look at the following web url http://www.mis.gla.ac.uk/biquery/training/ but each of the courses held have maximum of 8 people that could be
2
31455
by: Jack | last post by:
Hi All, What is the PHP equivilent of Oracle bind variables in a SQL statement, e.g. select x from y where z=:parameter Which in asp/jsp would be followed by some statements to bind a value to :parameter I dont like the idea of making the SQL statement on the fly without binding parameters as I dont want a highly polluted SQL cache.
3
23612
by: Sandwick | last post by:
I am trying to change the size of a drawing so they are all 3x3. the script below is what i was trying to use to cut it in half ... I get errors. I can display the normal picture but not the results of the picture half the size. The PHP I have installed support 1.62 or higher. And all I would like to do is take and image and make it fit a 3x3. Any suggestions to where I should read or look would be appreciated.
0
9696
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10903
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10644
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9423
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7827
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7014
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5681
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4482
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4062
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.