Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
And this is a handicap precisely why? Why isn't like saying that an automatic shift is a handicap, because it doesn't allow the driver to switch gears directly? That's probably true at 200 kph in the left lane of the Autobahn, but it's probably an actual benefit in stop/go traffic on i405 or the Dan Ryan.No support for pointers. Pointers are used "under the hood", but the developer has no control over them at all.
And ugliness is a handicap? My mother always said it wasn't...Lack of short-circuting in boolean evaluations. This makes for often ugly code.
An imitation of object orientation, without support for many important elements. For example, there is no inheritance or polymorphism, nor is there support for static members.
'a Public class called iAnimal
Public Sub Move()
End Sub
Public Sub Bite()
End Sub
'Now, a class called Flea, set to PublicNotCreateable
Implements iAnimal
Private Sub iAnimal_Move
msgbox "boing boing"
End sub
Private Sub iAnimal_Bite
msgbox "nip"
End Sub
'And a class called TRex, also PublicNotCreateable
Implements iAnimal
Private Sub iAnimal_Move
msgbox "KABOOOMMMM....KABOOOMMMM...."
End sub
Private Sub iAnimal_Bite
msgbox "CRRRUUNNNNCCCHHHH"
End Sub
'Now, a client
Public Sub cmdAnimal_Click()
dim x as iAnimal
dim y as iAnimal
set x = new Flea
set y = new TRex
x.move
x.bite
y.move
y.bite
End Sub
All the same, maybe all the DLL functionality needed for the great majority of applications is available to VB. So, again, it's hard for me to accept that this is a handicap.Use of non-COM DLLs (most standard DLLs) is severely handicapped. VB does not support function pointers which are often integral to many DLLs, and VB cannot load a DLL dynamically. It must be linked at compile-time. This means that a non-COM based plug-in architecture is completely unavailable to VB.
Well, as the following code demonstrates, one can use Mid to iterate through a string's characters, and can operate on them any way one wants:Strings can only be manipulated through functions like Mid and Left. One cannot iterate thorugh a string's characters and operate on them.
dim x as string
dim i as integer
x = "abcdefgh"
for i = 1 to len(x)
'Happily iterating away, character by character
msgbox "Currently on character " & i & " whose value is " & mid(x, i, 1)
Next
And again, this is a handicap (a severe one even) precisely why?No character data type. A character is considered a string of length 1.
No support for pointers. Pointers are used "under the hood", but the developer has no control over them at all.
Lack of short-circuting in boolean evaluations. This makes for often ugly code.
An imitation of object orientation, without support for many important elements. For example, there is no inheritance or polymorphism, nor is there support for static members.
Use of non-COM DLLs (most standard DLLs) is severely handicapped. VB does not support function pointers which are often integral to many DLLs, and VB cannot load a DLL dynamically. It must be linked at compile-time. This means that a non-COM based plug-in architecture is completely unavailable to VB.
Strings can only be manipulated through functions like Mid and Left. One cannot iterate thorugh a string's characters and operate on them.
No character data type. A character is considered a string of length 1.
I'm not sure if I agree with your definition of "truly" OO, Rick. If multiple inheritance and operator overloading are requirements of same, then so be it. However, I don't see that operator overloading really makes for more concise code, in that you have to accompany it with many more lines of documentation to explain what you're doing to everyone than you save in doing it. Furthermore, the difficulties with multiple inheritance are well documented. Not that it should never be done, but it's hard to find a situation where it's absolutely necessary.Although VB.NET does more than VB6 in this area, imo, it still lacks a couple of things to be considered a truly OO language, like for example operator overloading and multiple inheritance.