People criticize VB for teaching bad habits, but I wonder what exact bad habits do they mean? With "Option Explicit" and a little displicine, I don't see it being worse than any other language.
Printable View
People criticize VB for teaching bad habits, but I wonder what exact bad habits do they mean? With "Option Explicit" and a little displicine, I don't see it being worse than any other language.
i don't think VB has taught me any bad habits that i hadn't already learnt all by myself :o
:)
Dim SPEAK as String
speak = "something"
VB will automatically change speak to SPEAK.
I haven't seen any other language do that.
This can be a problem if you're switching to C/C++ which is case sensitive.
I think not being case sensitive is a good thing - and when it changes the case for you you get the reasurance that you have spelt the variable name correctly.
Indeed many people declare their variables proper case and then code them lower case for just this reason...
VB's real bad habits are things like: Variants which leads to developers not thinking about their variables, DefInt etc. likewise.
The case changing is a feature of the IDE, not the language itself, I don't think.
As far as Variants go - this is a legimate OLE data type that can be used with other languages that support OLE. Then there are languages such as Perl that don't really have data types at all.
Bad habit - using regular modules when you try to use OO approach. :)
Unless you're subclassing, there is no reason to use regular modules, its a memory dog :)
Serge,
So where would you put all your public functions/subs?
API Declarations?
A Class?
Yes, in the class. Your class should implement all API calls. Like I said, unless its a subclassing, there is no need for regular modules.
Bad habits? I swear I never used to scratch or burp in public before Vb.