malharone wrote:
Furthermore, VB has such concept of "Modules" which allows users to create static methods.
There are cases in which modules are perfectly fine... quite a few functions in .net are available in modules ;) C++ is a hybrid language too... I doubt you'd make the same comments about it?
malharone wrote:
Thus because VB allows such language exploitations, it promotes bad programming practices which come back and haunt you (or whoever is dealing with the mess) later.
VB isn't the only language that has that issue... they all do :suss: like int count = 0; for (int i=1; i<10; i+1) count + 1; perfectly compilable C++ code... but does absolutely nothing... besides an infinite loop :suss: or foo[foo[bar++ + ++foo[--foo[bar++] - bar--] + ++bar]--]++; confusing enough? or typedef int FOOBar; typedef void FooBAR; #define F00BAR 0 class Foobar { public: FooBAR foobar(); FOOBar fooBar(); }; class FooBar { public: FooBAR foobar(); Foobar fooBar(const Foobar &foobar); }; FooBAR Foobar::foobar() { Foobar foobar; } FOOBar Foobar::fooBar() { return F00BAR; } FooBAR FooBar::foobar() { FooBar foobar; } Foobar FooBar::fooBar(const Foobar &foobar) { return foobar; } FOOBar main() { FooBar FOOBAR; Foobar foobar; Foobar Foobar; FooBar FooBar; Foobar.foobar(); FooBar.foobar(); foobar.foobar(); FOOBAR.foobar(); foobar = FOOBAR.fooBar(foobar); return FooBar.foobar(); } very bad code, but perfectly compilable ;P exploiting typdefs and case sensitivity... int count = 0; for (int i=1; i < 10; i++); count++; again, perfectly compilable... now does that all make the language bad? not necessarily... no language is perfect. its harder to exploit having the same name in vb due to case sensitivity... for loops must be a block... can't use assignment where a condition is expected. does that make vb better? no... for some applications it will work better, for others another language is a better choice. Its a matter of choosing the right tool for the job.
malharone wrote:
I'd say the strengh of the language should be measured by the reserved keywords!
or maybe by the person using the keywords? ;) Anything can be exploited... from the for loops in c-ish languages to the option explicit + strict.