Hi Damien,
Well, yes and no. You are correct that Visual Basic 6 will allow you to 
create classes and objects, but Visual Basic 6's idea of object oriented 
programming doesn't have all the features of oop that Visual Basic 2008, 
Java, C++, etc have. The concept of polymorphism is basically 
non-existent in VB 6's implimentation of oop. VB 6 also lacks multiple 
inheritence.
While multiple inheritence is something you don't need to have in a oop 
program it certainly comes in handy for some specific situations. 
Multiple inheritence in C++ allows you to join related or unrelated 
classes in a new class like.
class Class3: Class1: Class2
Let us assume that Class1 and Class2 have nothing in common. When I 
created Class3 it inherits all the variables and methods from classses 1 
and 2 even though they are totally unrelated all  in the Class3 
declaration. With VB 6 since its idea of object oriented programming 
wasn't that advanced  you ended up having to rewrite some code somewhere 
a long the way. Which defeats one of the powers of oop in the first place.
Then, there is the matter of polymorphism. Polymorphism is simply the 
ability to give two class methods the same name, but two completely 
different functionalities. While this sounds confusing it really 
actually comes in handy when you want something to be the same function, 
but return two different types of data depending on the situation.
For example, let us assume you want to create a random number generator 
method. Sometimes you want it to return a double value while at others 
you just want an integer. Ok, no problem if you can use polymorphism you 
can create both, and the one that is needed for the calculation gets 
called at runtime.To modern object oriented languages
double RandomNumber(double start, double end)
is not the same thing as
int RandomNumber(int start, int end)
which means depending on what values are passed to the method the one 
that is needed for the calculation gets called while allowing you to 
still call RandomNumber(). Older languages or only partly oop languages 
like VB 6 won't allow this kind of polymorphism to be included in your 
application design.
In the end not having polymorphism or multiple inheritence isn't an 
earth shaddering event, but I just find not having them makes the 
language crippled and not well implamented. I'll be honest with everyone 
here I have come to have certain expectations about programming 
languages and Visual Basic 6 isn't one of them. The reason for my rather 
negative outlook on the language stems from the fact I have been exposed 
to several different advanced programming languages and techniques, and 
Visual Basic 6 is too basic for my taistes. There comes a point in a 
programmers life where knowing what you are missing makes you view more 
primative concepts no longer satisfying, and being human it is easy to 
say this language has this but this language does not. You compare the 
pros and cons, and I decided somewhere along the way Visual Basic is a 
language for amatures, newbies, but not for someone like me who has 
moved beyond the world of Basic.
Anyway, I am basically done with this topic as it is ot for the Audyssey 
list. So if we want to continue this debate perhaps the game developers 
list is a better place for it.
Cheers.



Damien Sadler wrote:
> Hi Tom,
> Firstly, it is possible to write object-oriented code in VB6. There is, for 
> example, classes, though you don't have to.
> I've found it can be used in a purely procedural method like:
> Sub MySub(Whatever As String)
> DoThis
> End Sub
>
> or:
>
> Public Sub MySub(Whatever As String)
> MyClass.DoThis
> End Sub
> I have just got the basics of writing classes, and have even made several 
> test dll's with it.
> In regards to dx8vb.dll not being available with Vista, it is included with 
> Acefire for that very reason. I saw previous discussions on list regarding 
> dx8vb.dll being the one component that was missed out.
> As much as I don't like Vista, I didn't, and don't, want anybody to miss out 
> on any of my projects, which is why I put dx8vb.dll actually in the install.
> Thanks.
> Regards,
> Damien
>   


---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to [EMAIL PROTECTED]
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[EMAIL PROTECTED]
If you have any questions or concerns regarding the management of the list,
please send E-mail to [EMAIL PROTECTED]

Reply via email to