Sign in to follow this  

why should I learn VB.NET

This topic is 4480 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

my only programming experience is with C++ and I was reading about .NET. It said C# was designed specifically for the .NET interface and you could do the same things with C# and VB.NET. so i was wondering, is there any reason someone should learn VB.NET?

Share this post


Link to post
Share on other sites
There isn't any reason not to try both C# and VB .NET out. I personally prefer C#, but I will admit that Intellisense for VB .NET seems to be better. No clue why that is though. Maybe when the final version .NET 2005 gets released there will be better parity there.

Share this post


Link to post
Share on other sites
Quote:
Original post by SiCrane
There isn't any reason not to try both C# and VB .NET out. I personally prefer C#, but I will admit that Intellisense for VB .NET seems to be better. No clue why that is though. Maybe when the final version .NET 2005 gets released there will be better parity there.


Trying out the 2005 beta, the C# intellisense is quite good. It will pop up when you are defining something (the actual type), which is nice for me coming from VB... Can't wait for it to come out on shelves.

Share this post


Link to post
Share on other sites
Quote:
Original post by SiCrane
I personally prefer C#, but I will admit that Intellisense for VB .NET seems to be better.


I suspect it's because the VB syntax is a bit more suggestive. Consider variable declarations -- they prompt for a type, whereas in C# there is no way intellisense could give you a type list for variables without you pulling up the list manually.

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
I suspect it's because the VB syntax is a bit more suggestive. Consider variable declarations -- they prompt for a type, whereas in C# there is no way intellisense could give you a type list for variables without you pulling up the list manually.

Not necessarily true. A variable declaration in VB.Net looks like Dim varname as Type while the C# equivalent is Type varname;. There's really not that much difference between them.

IntelliSense could be extended to be a much more powerful teaching tool, by having it suggest valid statement types and the range of expected/valid tokens that follow. If the range is too large (say, greater than 5), then the token category identifier could be display, and clicking on it could then pop up a secondary menu listing all of them. And, of course, all of this could be switched off easily once competence is attained.

I think IDEs should move past just "organizing your code and smoothing out the process of authoring code." I think it's time they began suggesting approaches, pointing out refactoring opportunities based on fixed local scope analysis and generally being more logographic.

But I digress.

Share this post


Link to post
Share on other sites
I think VB has always been about providing a reasonably quick way of getting prototype apps up and running. "rapid application development" if you like. Would you want to sell anything written in it? Well maybe, but the answer is predominantly no. If you need to knock out a quick and dirty tool for a tight deadline, it's a language to consider. The fact that it shares a lot of the same properties as C# makes for a simplified job of porting it. As to the benefits of C#, I have no idea.

Share this post


Link to post
Share on other sites
Quote:
Original post by DrewGreen
I think VB has always been about providing a reasonably quick way of getting prototype apps up and running. "rapid application development" if you like. Would you want to sell anything written in it? Well maybe, but the answer is predominantly no. If you need to knock out a quick and dirty tool for a tight deadline, it's a language to consider. The fact that it shares a lot of the same properties as C# makes for a simplified job of porting it. As to the benefits of C#, I have no idea.


VB.Net is a full featured language, and you would definitely want to sell anything written in it provided it works and is useful. Enough of the old "VB is not cool 'cause it's easier to get into." In fact I would pick an app written in VB.NET over the same app written in C++ anyday, if only for the fact that I'm sure the OS won't have to clean a huge mess at the end.

Share this post


Link to post
Share on other sites
Quote:
VB.Net is a full featured language, and you would definitely want to sell anything written in it provided it works and is useful. Enough of the old "VB is not cool 'cause it's easier to get into." In fact I would pick an app written in VB.NET over the same app written in C++ anyday, if only for the fact that I'm sure the OS won't have to clean a huge mess at the end.


Why? VB is slower than C++. Even if your OS has to clean up a mess, provided you're using a new one like XP, it should clean it up pretty easily. And in the hands of a skilled programmer, an app in C++ will run faster and more efficiently than one in VB.

Share this post


Link to post
Share on other sites
Quote:
Original post by xMcBaiNx
Enough of the old "VB is not cool 'cause it's easier to get into."


That's not what I said.
VB is a useful language & I use it for my own projects. It was also one of the first languages I chose to learn when I was starting out. It has it's benefits. The one I value most highly is the gui design features. It also has it's flaws. If you are looking for raw speed, you will never find it in VB. Perhaps that's changed since the introduction of the .net framework but as far as I'm aware it's still interpreted, and does nothing to encourage efficient program design. It is not a fully featured language either. There may well be additions such as linked list classes in the new editions but the ability to define your own *new* abstract data types without primitives such as pointers is severely limited. (and no, that isn't a "VB doesn't have pointers" comment.)
This may seem like I'm contradicting what I've just said but I personally found learning C to be a big challenge after being used to many years developing in a BASIC language.

In any case in a commercial environment where time is money, VB is a very desirable tool to use.

Share this post


Link to post
Share on other sites
Quote:
Original post by SpacedOut
Quote:
VB.Net is a full featured language, and you would definitely want to sell anything written in it provided it works and is useful. Enough of the old "VB is not cool 'cause it's easier to get into." In fact I would pick an app written in VB.NET over the same app written in C++ anyday, if only for the fact that I'm sure the OS won't have to clean a huge mess at the end.


Why? VB is slower than C++. Even if your OS has to clean up a mess, provided you're using a new one like XP, it should clean it up pretty easily. And in the hands of a skilled programmer, an app in C++ will run faster and more efficiently than one in VB.


The latest benchmarks I've seen suggest a number varying from 'same speed' to '5% difference' which is negligible, at best. With the advances in JIT compilation and by exploiting it well, it might even become faster than C++ for all practical purposes in a reasonnable timeframe. What's left to argue ? It has more features, is as powerful and it is easier to get into. Of course C++ is better suited for low-level programming, but low-level programming is certainly not of much concern to the vast majority of programmers.

Quote:
Original post by DrewGreen
If you are looking for raw speed, you will never find it in VB. Perhaps that's changed since the introduction of the .net framework


OK, forget everything you know from VB6. VB.NET is an entirely different language. It is object-oriented (VB was not), it is compiled, in supports reflection, delegates, generics and countless other features that I won't list here.

Quote:
but as far as I'm aware it's still interpreted, and does nothing to encourage efficient program design.


It's not interpreted, and I'm not aware of any language that encourage 'efficient program design', with the possible exception of some functionnal languages.



Seriously. VB.NET != VB6. It is almost entirely a new language. I'm not a huge VB.NET fan, I don't even use it as I prefer C#'s syntax. The speed and features are the same however. The only thing left to change is the mentality, which sadly, isn't going to happen soon.

Share this post


Link to post
Share on other sites
Quote:
Original post by SpacedOut
Why? VB is slower than C++. Even if your OS has to clean up a mess, provided you're using a new one like XP, it should clean it up pretty easily. And in the hands of a skilled programmer, an app in C++ will run faster and more efficiently than one in VB.


Please. I programmed in VB6 for a living, and could get as much speed out of it that I could C++. And with VB .NET it has the exact same performance of any of the .NET languages.

Share this post


Link to post
Share on other sites
I use VB.Net because I prefer VB's syntax to C#'s syntax, and thats the only real difference between the two languages (Unless you do the legacy VB6 way of doing stuff like Get/Put file IO). Its very easy to convert C# code to VB.Net and vice-versa. A better question would be "Why should I learn .Net?" Once you learn the .Net framework it doesn't matter what language you choose. It is just a matter of personal preference.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Shouldn't you be asking yourself that? How do you know what you need to learn until you have a project documented? Until then, learn all you can on any language. They can only be of help later.

Share this post


Link to post
Share on other sites
Quote:
Please. I programmed in VB6 for a living, and could get as much speed out of it that I could C++. And with VB .NET it has the exact same performance of any of the .NET languages.


it depends on what you're programming.

Share this post


Link to post
Share on other sites
Quote:
Original post by SpacedOut
Quote:
Please. I programmed in VB6 for a living, and could get as much speed out of it that I could C++. And with VB .NET it has the exact same performance of any of the .NET languages.


it depends on what you're programming.


Of course. If you're programming drivers or embedded systems. But provided that the topic here is games, it doesn't matter.

Share this post


Link to post
Share on other sites
i didn't read all the posts, but someone mentioned VB is slower than C++.

There's nothing that says C++ is automatically faster. Languages are not what is being executed. Machine code is being executed and both VB, and C++ compile to machine code. Yes, you can make a very good VB compiler that makes faster code than any C++ compiler out there.

Recent speed tests with the server JVM have shown java is considerably faster than the GCC C++ compiler. When java is JIT compiled.

You could make C++ the slowest language in the world if you interpreted it, and had 10 layers of virtual machines. Languages are just a syntax.

Share this post


Link to post
Share on other sites
Yes you heard that correctly, java is now faster than C++ even with the initial JIT compilation time factored in. Everyone get off your language superiority high horses and realize that langues are just a syntax.

Share this post


Link to post
Share on other sites
Quote:
Original post by Lord Tydus
Yes you heard that correctly, java is now faster than C++ even with the initial JIT compilation time factored in. Everyone get off your language superiority high horses and realize that langues are just a syntax.

Sigh, give all of us advoacting JIT a break and don't say something so ridiculous that isn't backed up by facts. Show benchmarks proving your point if you must, but make sure they are at least semi-reliable.

Share this post


Link to post
Share on other sites
Quote:
Original post by Lord Tydus
Yes you heard that correctly, java is now faster than C++


with all due respect: i still can't stand java because it takes like 10 seconds for a GUI application to even load. yes, you heard that correctly: Java is slow. Swing is an unbearably slow API that has no place outside of internal comapny tools.
aside from that: i use VB for prototyping. it's pretty fast, and simple GUI things are easy and straightforward. i would never regaurd (aka: hire) someone who used it as a base language, but it has it's place even if it is fast enough. fact is, everytime i try to do something complicated in VB, it's easier to use C++.

Share this post


Link to post
Share on other sites
It's as fast as C#, it's simple, I like the syntax (I prefer it to a C-type syntax, I find it easier to read - End If/Exit For type statements are easier for me to understand rather than }-does-everything)... if you're learning C#, then you can pretty much directly translate between VB.NET and C#. If you prefer a C-type syntax, go for C#. If you prefer a BASIC-type syntax, go for VB.NET.

Share this post


Link to post
Share on other sites

go to:

http://java.sys-con.com/read/45250.htm


However, this just means the server version of the JVM produces faster, more efficient code than gcc C++ compiler. It doesn't mean one language is faster than another beucase thats impossible. Languages are just a syntax. C++ is seen as some ultimate efficiency lanugage, but people dont' understand that lanugaes are just english like replacements for machine instructions. C++ has pointers, to let you access memory. Does that mean a language without explicit pointers can't produce better optimized code?

And VB.NET is only JIT compiled the FIRST time you run the program. After that you just have the machine code forever. You could try to write a program that executes faster in C++, but you'll find that your not really able to make it run much faster than the machine code VB.NET program.

Share this post


Link to post
Share on other sites
It's just a bias people have when they see something different. If someting is like

If i > 10
'do stuff
End if

instead of

if(i>10)
{
//do stuff
}

They assume that the complier can't possibly match the machine instructions of a C++ compiler. But that's not true and many languages with a reputation for beling "slow" have outperformed some of the top C++ compilers. They are slow becuase of their design goals. Are they to be interpreted? How many layers of virtual machine does it have? Is it JIT compiled every time or just the first time you run it?

Share this post


Link to post
Share on other sites
And with that said i'd like to congratulate the Sun for making, maybe the fastest compiler in the world.

And I would like to thank microsoft for making a platform where C++ goes no faster than VB and compiles to the same machine code.

Share this post


Link to post
Share on other sites

This topic is 4480 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this