• Welcome to Valhalla Legends Archive.
 

Visual Basic .Net vs Visual Basic 6.0

Started by DarkVirus, November 08, 2003, 12:20 PM

Previous topic - Next topic

DarkVirus

I'd like to create this thread ONLY for the discussion of the differences, likes and dislikes between Visual Basic .Net and Visual Basic 6.0. I don't want this thread to be a flaming contest to see who can bash VB the best because I'll just delete the posts. This is also not a thread to discuss why people should switch from Visual Basic 6.0 to C#.

So with that said, I encourage anyone who codes in this language to bring your opinions to the table.
To restrict ones ability to learn based on current surroundings means to never learn anything at all. - DarkVirus

Grok

I dislike how in VB.NET, you cannot declare a module-level variable, such as:

Option Explicit

Dim LPOS As Long


But instead, you have to create a class at the appropriate scope level and make the variable visible.

Tuberload

Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Adron

Quote from: Tuberload on November 08, 2003, 10:39 PM
Defeats the purpose of encapsulation.

Indeed it does. However, encapsulation isn't any good purpose in itself. Use the best methodology for each situation, whether it be encapsulation or global variables. A language shouldn't restrict your choice of methodology, unless it's a language designed to teach people to program in a certain way (think Pascal).

Grok

Quote from: Tuberload on November 08, 2003, 10:39 PM
Defeats the purpose of encapsulation.

I don't see how.  Maybe you mean something else.  If I declared a module-level variable, then that variable is encapsulated by the module.  Did you mean something else?

' form Form1
Option Explicit

Public LPOS As Long


Now for a caller:
'module basStart
Option Explicit

Private Sub Main()
   Form1.Show
   Form1.LPOS = 8
   MsgBox "The value of LPOS on Form1 is = " & Form1.LPOS, vbExclamation
End Sub


It seems encapsulated to me.

Banana fanna fo fanna

Visual Basic .NET sucks vs VB6, but at the same time, is much better.

Pros:
- OOP
- Good standard library
- Good standard library
- Good standard library

Cons:
- Strict typing
- Overly verbose inheritance
- .NET VM is one slow mofo, but it actually doesn't consume that much RAM
- VB.NET is absolutely nothing like VB6.
- Not RAD (in my opinion)
- Can't port your code straight from VB6.

I'd rather use VB.NET, but it's just too slow on my POS computer (p3 550mhz).

Tuberload

Quote from: Grok on November 09, 2003, 11:00 AM
Quote from: Tuberload on November 08, 2003, 10:39 PM
Defeats the purpose of encapsulation.

I don't see how.  Maybe you mean something else.  If I declared a module-level variable, then that variable is encapsulated by the module.  Did you mean something else?

' form Form1
Option Explicit

Public LPOS As Long


Now for a caller:
'module basStart
Option Explicit

Private Sub Main()
   Form1.Show
   Form1.LPOS = 8
   MsgBox "The value of LPOS on Form1 is = " & Form1.LPOS, vbExclamation
End Sub


It seems encapsulated to me.

I meant, that by creating a class, and declaring the variables public defeats the purpose of encapsulation.

Adron: Yes you are right. OOP is my preferred programming methodology, so I guess I was stating my opinion.
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Grok

I think you mean that making the variable public defeats data hiding.  That's different from encapsulation.

Tuberload

#8
I guess I am mixing practices and methodologies, thanks for pointing this out.
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

DarkVirus

Quote from: St0rm.iD on November 09, 2003, 03:47 PM
Visual Basic .NET sucks vs VB6, but at the same time, is much better.

Pros:
- OOP
- Good standard library
- Good standard library
- Good standard library

Cons:
- Strict typing
- Overly verbose inheritance
- .NET VM is one slow mofo, but it actually doesn't consume that much RAM
- VB.NET is absolutely nothing like VB6.
- Not RAD (in my opinion)
- Can't port your code straight from VB6.

I'd rather use VB.NET, but it's just too slow on my POS computer (p3 550mhz).

How is it not RAD? VB.Net provides all of the older methods of Vb6.0 with a few exceptions. You are still able to to RAD but with a little stricter coding. And even then you don't HAVE to use the new methods provided with .Net because almost all of the old ones are still supported.

Also porting your old projects will obviously be harder because Microsoft is obviously hoping VB.net programmers will rely on the OOP structure of doing things. Thats just the impression a lot of people get, that its more object orientated so it MUST be bad. But I've yet to find any functions provided in VB6.0 that won't work in .Net except for a few. But those few are replaced by newer and better functions.

.Net provides (strict coding) mainly for the purpose of not being able to imply anything. So I would find it more beneficial to create an instanse of a form then simply opening it using Form1.Show.
To restrict ones ability to learn based on current surroundings means to never learn anything at all. - DarkVirus

Grok

I side with DV here regarding VB.NET being RAD.  If VB6 can be defined as RAD, then VB.NET must be RAD++.  So far in my usage of VB.NET, everything I've tried in VB.NET could be done quicker and prettier than with equivalent VB6.

DarkVirus

For those that give reasons as to why you don't like a specific language, please provide an actual explanation as to WHY you dislike it. Simply creating a list of the "topics" you dislike does the readers no good, because the thread is to be used as an educational tool (as is all our forums) for those either migrating over or for other reasons. I for one have found only one problem with VB.Net that I dislike and its really dumb actually. The only thing SO FAR I dislike about the new language is the fact that older versions of database coding isnt supported such as DAO,RDO or ADO. They can be used with modications, but to the point of giving up Id imagine, so do yourselves a favor if you enjoy coding databases and learn ADO.Net.  8)

With that as the exception, I've found nothing in VB.Net that I couldn't do in VB6 because I can switch between methods which is in my opinion, gives me a LOT more flexability than VB6 allowed.
To restrict ones ability to learn based on current surroundings means to never learn anything at all. - DarkVirus

Banana fanna fo fanna

I think weak typing is core to RAD. VB.NET is strongly typed, isn't it? I could be wrong on this one.

Grok

Is your definition of 'strongly typed' that of a language which supports very few, if any, implicit conversions?

DarkVirus

Quote from: St0rm.iD on November 11, 2003, 01:24 PM
I think weak typing is core to RAD. VB.NET is strongly typed, isn't it? I could be wrong on this one.

Thats one thing that most people don't care for, which is the lack of implicit coding :) I find it annoying at first, but getting used to it becomes second nature for explicit coding, just as implicit coding was before.

Do you know what RAD really means? Not stands for because we all know what "RAD" stands for, but what MAKE VB a RAD language? If you don't know or your fuzzy then we'd be glad to define it for you :) Might clear up some confusion for others
To restrict ones ability to learn based on current surroundings means to never learn anything at all. - DarkVirus