473,383 Members | 1,837 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Classes vs. Modules

I've read the docs on this, but one thing was left unclear. It seems
as though a Module does not have to be fully qualified. Is this the
case? I have source that apparently shows this.

Are modules left-over from VB6, and not much used anymore? It seems
that it is better to require Imports or use fully qualified names for
functions in other classes/modules, but a Module doesn't require this,
cluttering the global namespace. It seems using a class with shared
functions/subs is better.

Any recommendations?

Zytan

Feb 9 '07
173 5540
Scott: I just don't know where you are coming from on this. Have you tried
placing Sub Main in a class and your command line switches didn't work or
are you imagining it could be problematic and avoiding it as such?

I will guarantee you that my standard app framework supports both GUI and
console apps and that both start with exactly the same class and the same
Sub Main. I simply change the build setting on the compiler. And of course
I can easily read the command line switches and "start differently" based
upon the user. Seriously if I couldn't handle such trivial things using my
app class I would have used a module yet I haven't.

Check with Cor and others and they will explain that a module is in fact a
predefined class in VB.Net.
"Scott M." <s-***@nospam.nospamwrote in message
news:ug**************@TK2MSFTNGP06.phx.gbl...
An application that starts from the command line with different potential
switches attached is the one I had in mind. Another could be applications
that start differently based on the user logged into the domain. Really,
any application that has multiple startup paths where those startup paths
are determined in a non-GUI way.
"Tom Leylan" <tl*****@nospam.netwrote in message
news:e4*************@TK2MSFTNGP06.phx.gbl...
>Scott: Rather than just say "can benefit greatly" try to list one item,
two or three if there are than many benefits. I personally know of no
benefit so if you posted one it would help me and I'm sure others. What
don't we understand about this?
"Scott M." <s-***@nospam.nospamwrote in message
news:O7**************@TK2MSFTNGP02.phx.gbl...
>>But don't forget that not all apps are Windows Forms apps. Console apps
can benefit greatly from sub main.
"Tom Shelton" <to*********@comcastXXXXXXX.netwrote in message
news:Ua******************************@comcast.co m...
On 2007-02-10, Scott M. <s-***@nospam.nospamwrote:
But if you were to create a class that handled program flow during
startup,
you'd be doing extra work to get you to exactly what you could have
automatically with a module and Sub Main.
>
>
"Tom Shelton" <to*********@comcastXXXXXXX.netwrote in message
news:9P******************************@comcast. com...
>On 2007-02-09, Scott M. <s-***@nospam.nospamwrote:
>>I don't know if I agree with that. A module can be used as a
>>starting
>>point
>>for your application along with a Sub Main. This can be helpful in
>>directing the flow of the application startup.
>>
>So can a class.
>>
>--
>Tom Shelton

It's not any extra work to make a class the startup object versus a
module -
well except for maybe making a private sub new so that no one can make
instances of your Program class.

Of course, in VB 2005 - you pretty much have to use a form as your
startup
object anyway. You dont' get to do a submain. Well, that isn't
strictly
true, but if you want to use the application framework that VB.NET
provides
then you do (and why wouldn't you - visual styles, single instance app,
settings, etc).

--
Tom Shelton




Feb 11 '07 #51

"Zytan" <zy**********@yahoo.comwrote in message
news:11*********************@a75g2000cwd.googlegro ups.com...
>Again, why don't you create a small project in VB6 and in VB2005 and
show
the performance statistics?

Does that imply VB6 didn't use classes? I thought it was based on a
prior version of the .NET run-time, and that that was still class
based.

Zytan
VB6 was pre-.Net. Technically, it had classes, but not true OO
capabilities.

Robin S.
Feb 11 '07 #52

My point is that a class (in Dutch the word is almost the same and has the
same meaning as in English) tells someting about a type. A shared class
tells nothing, it is a stand alone object not something that describes a
group.

A module is a much beter name for me for that.

For me it is more that it is not the right word in C languages as well. I
would propose to call it there as well modules.

Cor

"Tom Leylan" <tl*****@nospam.netschreef in bericht
news:uK**************@TK2MSFTNGP06.phx.gbl...
We've been over this before on other threads. The module you think you
wrote has been determined to be a class (if you believe what others posted
here about modules) so you haven't constructed a module but rather a class
with a VB-only name attached to it. What is the point of that? And you
don't have to answer I can almost list the names of the people who like
modules and those who don't see a need from the other threads.

Do like the BASIC variable naming convention that string variables must
end with a $ symbol? Would it be a fair guess that neither you nor
Herfried mind that that convention was dropped? So is this a matter of
figuring out which conventions you guys will let drop from the language.
:-)

Can you subclass your module? Is it serializable?
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>Tom,

I still don't understand your preference, see this shared class and the
module.

Public Class TheClass
Private Shared mymember As Integer
Friend Shared Property Member() As Integer
Get
Return mymember
End Get
Set(ByVal value As Integer)
mymember = value
End Set
End Property
Public Shared Sub Method()
End Sub
End Class

Public Module TheModule
Private mymember As Integer
Friend Property Member() As Integer
Get
Return mymember
End Get
Set(ByVal value As Integer)
mymember = value
End Set
End Property
Public Sub Method()
End Sub
End Module

I find the module much nicer. (For those who saw my name in this thread,
I have changed my idea about this in favour for a *good* written module.
That good is very important in that)

Cor

"Tom Leylan" <tl*****@nospam.netschreef in bericht
news:ez**************@TK2MSFTNGP04.phx.gbl...
>>Just stick with your original concerns and forget about modules. Yes of
course one can use a module, one can place their Sub Main in a module
and they can put commonly used functions and procedures in a module
however it isn't necessary and lots of people (including me) don't.

I too have a Sub Main but mine just happens to be a Shared method of my
standard application class. This application class can contain any
routines common to the app as well so one continues to reap all the
benefits of a class implementation with no downside. Additionally
should it ever be needed I can convert (or pay somebody to convert) the
entire app to C# or even Java because there is nothing "VB-only" about
the application. The class, method, property modelling will translate
across the board.

I'll suggest you keep your options open.

"Zytan" <zy**********@yahoo.comwrote in message
news:11**********************@k78g2000cwa.google groups.com...
Personally, I do /not/ use modules to store variables and program
state. I
use modules only in very few cases: The project's main entry point is
placed in a module 'Program'. In addition, common functions are
placed in
modules if their use makes sense throughout the project, similar to
"Microsoft.VisualBasic.dll" and its modules. In this case modules are
used
to structure a huge set of functions, but make them easily accessible
in
IntelliSense everywhere.

Understood. Thanks. I guess I'm paranoid about having things
floating around, so I want them under something, say Math.Pi instead
of just Pi.

Zytan.



Feb 11 '07 #53
Scott,

Never thought about that Tomatoes and tomato. I say always colour and you
say color.
But a good sample.

Cor

"Scott M." <s-***@nospam.nospamschreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
Tom, I think this really comes down to "you say tomatoe and I say tomato".
I have had this conversation many times albeit about other aspects of VB
vs. the Framework. Should VB language functions be used over .NET
Framework classes and methods, for example? The debate rages on.

What I do think is that no one can say with certainty "do" or "do not" use
modules. They exist and by that very fact, they are viable. I never
indicated that they "should" be used, nor did I even indicate that they
should "always" be used. In fact, I rarely use them. But in certain
situations, they serve a purpose and can be of help.

If you really want to have an objective conversation here, you must be
willing to concede that your comments about VB legacies are your opinions
and not facts. I happen to largely agree with you personally, but that
doesn't change the fact that it's just my preference/opinion, it doesn't
make it gospel.


"Tom Leylan" <tl*****@nospam.netwrote in message
news:%2******************@TK2MSFTNGP05.phx.gbl...
>I'll bet the transition from the "here is what I like" type of discussion
to one based upon actual issues will be difficult but let's try :-)

Scott wrote"you'd be doing extra work..." so the next logical question
is, what extra work? I've always used an application class to start the
apps so how much extra work have I been creating for myself? Then Tom S.
suggests that VB 2005 apps probably start with forms.

What I'm asking each person to consider is... perhaps the type of apps
you write are different (maybe the most common) but still not the only
type. There are business app, there are utilities, there are "kiosks" and
there are services. Some have no front-end, some minimal and some only
need console-based front-ends. Some (think ATM machine) typically have
no menu, and few, if any pop-up forms. Some apps are used in-house only,
some are intended for distribution and of those some to closely
controlled clients and some sold as products to the general public.

From another direction, some (and I suspect many here) are single-person
projects but that isn't too common in the business software world.
Team-based development isn't filled with "here is what I like" type
decisions or when they are the resulting app is a mess. A project
estimated to take 10 developers one year to complete isn't impacted by
the "extra work" if that means 1 minute to create a Sub Main in a class.

Programmers in typical business settings aren't (necessarily) VB experts
and it is my preference (even when the project is being written in VB)
that they are not . This has nothing to do with VB but rather a lot to
do with any self-professed language "expert." Recall the quote: "To the
man with a hammer everything looks like a nail." We've all met Access,
FoxPro, VB, Java and other language developers explaining how they could
have written the same app in half an hour and there would be no bugs. It
isn't true, it did have bugs and the apps often looked crude. They often
don't aid the user in doing their job but rather restrict the user making
it harder for them to do their job.

My point is that a style of development, the adoption of some rule, the
choice of using modules, the use of public variables, the calling of
framework methods rather than relying on VB functions, etc. is impacted
by all of the above. If a company somewhere is having a hard time
transitioning a VB6 app to .Net (assuming that is a goal) it can be in
large part because they wrote a "VB6 app" rather than an application
using VB6. Using every VB6 trick in the book can lock them into a system
that is hard to transition when no other language has whatever VB6-isms
they are using. I'm not suggesting this is a VB-only problem, the tighter
the connection to any single language the harder it will be to migrate
and business needs may dictate a migration.

So when people write "here is what I do" it might help if the person
considering it ask themself, is my situation similar? Am I writing a
similar type app, under similar conditions and intended for a similar
audience? Just because somebody writes "that's what they do at Citibank"
doesn't it make it right for you, unless perhaps you too are a large
bank. What works for your home-use contact manager program isn't likely
to work for the FDIC or NASA or on the floor of the NYSE.

Anyway that's my 2 cents (or was that 5 cents?)
"Tom Shelton" <to*********@comcastXXXXXXX.netwrote in message
news:Ua******************************@comcast.com ...
>>On 2007-02-10, Scott M. <s-***@nospam.nospamwrote:
But if you were to create a class that handled program flow during
startup,
you'd be doing extra work to get you to exactly what you could have
automatically with a module and Sub Main.
"Tom Shelton" <to*********@comcastXXXXXXX.netwrote in message
news:9P******************************@comcast.c om...
On 2007-02-09, Scott M. <s-***@nospam.nospamwrote:
>I don't know if I agree with that. A module can be used as a
>starting
>point
>for your application along with a Sub Main. This can be helpful in
>directing the flow of the application startup.
>
So can a class.
>
--
Tom Shelton

It's not any extra work to make a class the startup object versus a
module -
well except for maybe making a private sub new so that no one can make
instances of your Program class.

Of course, in VB 2005 - you pretty much have to use a form as your
startup
object anyway. You dont' get to do a submain. Well, that isn't
strictly
true, but if you want to use the application framework that VB.NET
provides
then you do (and why wouldn't you - visual styles, single instance app,
settings, etc).

--
Tom Shelton



Feb 11 '07 #54
Tom,

"Tom Leylan" <tl*****@nospam.netschrieb:
We've been over this before on other threads. The module you think you
wrote has been determined to be a class (if you believe what others posted
here about modules) so you haven't constructed a module but rather a class
with a VB-only name attached to it.
In the current implementation of .NET which VB is based on, it's based on
classes under the hoods. However, the concept of modules in VB exists
already longer than .NET exists and modules are clearly not the same as
classes are.

Semantically modules and classes are entirely different. Modules are a
loose grouping construct whereas classes represent instantiable entities
(there are a few exceptions where classes cannot be instantiated, but often
the reason for that is that their instances would not form a complete
entity. That's why I think that modules are an important feature. They
simply cannot be mimicked using a class (in VB/C# semantics, not IL
semantics) because classes are classes and modules are modules.
Do like the BASIC variable naming convention that string variables must
end with a $ symbol? Would it be a fair guess that neither you nor
Herfried mind that that convention was dropped?
In this particular case I don't see any reason for dropping the convention.
However, I'd prefer if the IDE turned 'Dim i%' into 'Dim i As Integer'
automatically.
Can you subclass your module? Is it serializable?
As modules do not form what I call entities, I don't see a reason for
subclassing and serialization. Namespaces cannot be serialized too,
although they are a language construct. Modules and classes have (from a VB
point of view) different semantics and thus different characteristics
(operations that can be performed, ways to make use of them, ...).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Feb 11 '07 #55
Cor,

"Cor Ligthert [MVP]" <no************@planet.nlschrieb:
My point is that a class (in Dutch the word is almost the same and has the
same meaning as in English) tells someting about a type. A shared class
tells nothing, it is a stand alone object not something that describes a
group.

A module is a much beter name for me for that.
I agree. Overloading the meaning of 'Class' for different things is hardly
a good idea.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Feb 11 '07 #56
All I am asking from you is when you write "in certain situations" that
you define one of them so people reading this (and these message exist
forever) will understand when they should choose a module over a class.
I've already responded to your request, but my first response (in certain
situations) is perfectly valid. It just seems that you are up on a soapbox
here.
If the extra work you mentioned takes a week I'll concede the point, if
the extra work is one minute I'd say the word "extra" is a bit of a
stretch.
That's your "opinion" and you are entitled to it. If I can find something
that saves me a minute every so often and it does just what I need it to,
I'll take the extra minute.
>

"Scott M." <s-***@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>Tom, I think this really comes down to "you say tomatoe and I say
tomato". I have had this conversation many times albeit about other
aspects of VB vs. the Framework. Should VB language functions be used
over .NET Framework classes and methods, for example? The debate rages
on.

What I do think is that no one can say with certainty "do" or "do not"
use modules. They exist and by that very fact, they are viable. I never
indicated that they "should" be used, nor did I even indicate that they
should "always" be used. In fact, I rarely use them. But in certain
situations, they serve a purpose and can be of help.

If you really want to have an objective conversation here, you must be
willing to concede that your comments about VB legacies are your opinions
and not facts. I happen to largely agree with you personally, but that
doesn't change the fact that it's just my preference/opinion, it doesn't
make it gospel.


"Tom Leylan" <tl*****@nospam.netwrote in message
news:%2******************@TK2MSFTNGP05.phx.gbl. ..
>>I'll bet the transition from the "here is what I like" type of
discussion to one based upon actual issues will be difficult but let's
try :-)

Scott wrote"you'd be doing extra work..." so the next logical question
is, what extra work? I've always used an application class to start the
apps so how much extra work have I been creating for myself? Then Tom
S. suggests that VB 2005 apps probably start with forms.

What I'm asking each person to consider is... perhaps the type of apps
you write are different (maybe the most common) but still not the only
type. There are business app, there are utilities, there are "kiosks"
and there are services. Some have no front-end, some minimal and some
only need console-based front-ends. Some (think ATM machine) typically
have no menu, and few, if any pop-up forms. Some apps are used in-house
only, some are intended for distribution and of those some to closely
controlled clients and some sold as products to the general public.

From another direction, some (and I suspect many here) are single-person
projects but that isn't too common in the business software world.
Team-based development isn't filled with "here is what I like" type
decisions or when they are the resulting app is a mess. A project
estimated to take 10 developers one year to complete isn't impacted by
the "extra work" if that means 1 minute to create a Sub Main in a class.

Programmers in typical business settings aren't (necessarily) VB experts
and it is my preference (even when the project is being written in VB)
that they are not . This has nothing to do with VB but rather a lot to
do with any self-professed language "expert." Recall the quote: "To the
man with a hammer everything looks like a nail." We've all met Access,
FoxPro, VB, Java and other language developers explaining how they could
have written the same app in half an hour and there would be no bugs.
It isn't true, it did have bugs and the apps often looked crude. They
often don't aid the user in doing their job but rather restrict the user
making it harder for them to do their job.

My point is that a style of development, the adoption of some rule, the
choice of using modules, the use of public variables, the calling of
framework methods rather than relying on VB functions, etc. is impacted
by all of the above. If a company somewhere is having a hard time
transitioning a VB6 app to .Net (assuming that is a goal) it can be in
large part because they wrote a "VB6 app" rather than an application
using VB6. Using every VB6 trick in the book can lock them into a system
that is hard to transition when no other language has whatever VB6-isms
they are using. I'm not suggesting this is a VB-only problem, the
tighter the connection to any single language the harder it will be to
migrate and business needs may dictate a migration.

So when people write "here is what I do" it might help if the person
considering it ask themself, is my situation similar? Am I writing a
similar type app, under similar conditions and intended for a similar
audience? Just because somebody writes "that's what they do at
Citibank" doesn't it make it right for you, unless perhaps you too are a
large bank. What works for your home-use contact manager program isn't
likely to work for the FDIC or NASA or on the floor of the NYSE.

Anyway that's my 2 cents (or was that 5 cents?)
"Tom Shelton" <to*********@comcastXXXXXXX.netwrote in message
news:Ua******************************@comcast.co m...
On 2007-02-10, Scott M. <s-***@nospam.nospamwrote:
But if you were to create a class that handled program flow during
startup,
you'd be doing extra work to get you to exactly what you could have
automatically with a module and Sub Main.
>
>
"Tom Shelton" <to*********@comcastXXXXXXX.netwrote in message
news:9P******************************@comcast. com...
>On 2007-02-09, Scott M. <s-***@nospam.nospamwrote:
>>I don't know if I agree with that. A module can be used as a
>>starting
>>point
>>for your application along with a Sub Main. This can be helpful in
>>directing the flow of the application startup.
>>
>So can a class.
>>
>--
>Tom Shelton

It's not any extra work to make a class the startup object versus a
module -
well except for maybe making a private sub new so that no one can make
instances of your Program class.

Of course, in VB 2005 - you pretty much have to use a form as your
startup
object anyway. You dont' get to do a submain. Well, that isn't
strictly
true, but if you want to use the application framework that VB.NET
provides
then you do (and why wouldn't you - visual styles, single instance app,
settings, etc).

--
Tom Shelton




Feb 11 '07 #57

"Tom Leylan" <tl*****@nospam.netwrote in message
news:u3***************@TK2MSFTNGP06.phx.gbl...
Scott: I just don't know where you are coming from on this. Have you
tried placing Sub Main in a class and your command line switches didn't
work or are you imagining it could be problematic and avoiding it as such?
I'm so sorry that you are having such a hard time Tom. To answer your
question, no I haven't. But, that what not the OP. Modules are *another*
way of handling such things. I find them easier for these situations than
custom classes. I find them quicker to set up and use than custom classes
and I find them to make more sense from a *flow* standpoint in these
situations.

No one said that classes wouldnt do (and that seems to be your stance here).

I will guarantee you that my standard app framework supports both GUI and
console apps and that both start with exactly the same class and the same
Sub Main. I simply change the build setting on the compiler. And of
course I can easily read the command line switches and "start differently"
based upon the user. Seriously if I couldn't handle such trivial things
using my app class I would have used a module yet I haven't.
See my comments above.
Check with Cor and others and they will explain that a module is in fact a
predefined class in VB.Net.
Thanks but I don't need the homework assignment. I know exactly what a
module is and all I've said here is that in some situations they are easier
to use. You seem very threatened by this statement.
Feb 11 '07 #58
Must have. I don't see anything from Robin in this entire thread.
"Bruce W. Darby" <kr******@atcomcast.netwrote in message
news:e8******************************@comcast.com. ..
Not sure Scott. Are you seeing other posts by Robin? Or did you
inadvertently add him to your killfile?

"Scott M." <s-***@nospam.nospamwrote in message
news:Oe**************@TK2MSFTNGP06.phx.gbl...
>Hmmm, why don't I see Robin's message in this thread?
"Bruce W. Darby" <kr******@atcomcast.netwrote in message
news:VP******************************@comcast.com ...
>>I'll answer that for him, Robin.... because he CAN'T!! I'm coming to the
conclusion that our neophyte troll doesn't know how to program. If he
can't drag it and drop it, he's lost. Now, he COULD prove me wrong, but
I doubt that he'll even attempt to. :)

Bruce

"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:xs******************************@comcast.co m...
Why don't you post some code samples that show the same thing running
in VB6 and VB2005 and show the performance statistics?

Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.
-----------------------------------------------




Feb 11 '07 #59
There's only been one post by me (Robin) *in* this entire thread. Do you
see this one?

Robin S.
----------------------
"Scott M." <s-***@nospam.nospamwrote in message
news:OA**************@TK2MSFTNGP05.phx.gbl...
Must have. I don't see anything from Robin in this entire thread.
"Bruce W. Darby" <kr******@atcomcast.netwrote in message
news:e8******************************@comcast.com. ..
>Not sure Scott. Are you seeing other posts by Robin? Or did you
inadvertently add him to your killfile?

"Scott M." <s-***@nospam.nospamwrote in message
news:Oe**************@TK2MSFTNGP06.phx.gbl...
>>Hmmm, why don't I see Robin's message in this thread?
"Bruce W. Darby" <kr******@atcomcast.netwrote in message
news:VP******************************@comcast.co m...
I'll answer that for him, Robin.... because he CAN'T!! I'm coming to
the conclusion that our neophyte troll doesn't know how to program. If
he can't drag it and drop it, he's lost. Now, he COULD prove me wrong,
but I doubt that he'll even attempt to. :)

Bruce

"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:xs******************************@comcast.c om...
Why don't you post some code samples that show the same thing running
in VB6 and VB2005 and show the performance statistics?
>
Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.
-----------------------------------------------




Feb 11 '07 #60
On Feb 10, 9:01 pm, "Scott M." <s...@nospam.nospamwrote:
"Tom Leylan" <tley...@nospam.netwrote in message

news:u3***************@TK2MSFTNGP06.phx.gbl...
Scott: I just don't know where you are coming from on this. Have you
tried placing Sub Main in a class and your command line switches didn't
work or are you imagining it could be problematic and avoiding it as such?

I'm so sorry that you are having such a hard time Tom. To answer your
question, no I haven't. But, that what not the OP. Modules are *another*
way of handling such things. I find them easier for these situations than
custom classes. I find them quicker to set up and use than custom classes
and I find them to make more sense from a *flow* standpoint in these
situations.
I'm sorry Scott, but you are making absolutely no sense here. The
fact is that it takes almost exactly the same amount of work to put
your sub main in a class as it does in a module. There is hardly any
difference here, except for the addition of the shared keyword on the
sub main - and that is what happens automatically if you use a module.

There is no situation that I can think of where a module is superior
or significantly easier then a class. That could be because I do 99%
of all my work in C#, and there is no concept of a module there...
The closest thing is the static class added in C#2.0 - which is a way
to get the compiler to enforce what most of us do anyway - create a
class with a private constructor and all static methods :)

Now, I'm not saying that you shouldn't use Modules. Your style is
your style. I don't use them when I do VB work, but that is my
choice. The only thing I object to in your statement is the
implication that it is more work to use a class.... Simply not true -
at least in any significant manner.

--
Tom Shelton

Feb 11 '07 #61
ROOOOOOOOOBIN,

Ollie Ollie Oxen Free...Free...Free... :)

Bruce

"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:4M******************************@comcast.com. ..
There's only been one post by me (Robin) *in* this entire thread. Do you
see this one?

Robin S.
----------------------
"Scott M." <s-***@nospam.nospamwrote in message
news:OA**************@TK2MSFTNGP05.phx.gbl...
>Must have. I don't see anything from Robin in this entire thread.
"Bruce W. Darby" <kr******@atcomcast.netwrote in message
news:e8******************************@comcast.com ...
>>Not sure Scott. Are you seeing other posts by Robin? Or did you
inadvertently add him to your killfile?

"Scott M." <s-***@nospam.nospamwrote in message
news:Oe**************@TK2MSFTNGP06.phx.gbl...
Hmmm, why don't I see Robin's message in this thread?
"Bruce W. Darby" <kr******@atcomcast.netwrote in message
news:VP******************************@comcast.c om...
I'll answer that for him, Robin.... because he CAN'T!! I'm coming to
the conclusion that our neophyte troll doesn't know how to program. If
he can't drag it and drop it, he's lost. Now, he COULD prove me wrong,
but I doubt that he'll even attempt to. :)
>
Bruce
>
"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:xs******************************@comcast. com...
>Why don't you post some code samples that show the same thing running
>in VB6 and VB2005 and show the performance statistics?
>>
>Robin S.
>Ts'i mahnu uterna ot twan ot geifur hingts uto.
>-----------------------------------------------
>
>




Feb 11 '07 #62
Oh, there you are. I was hiding behind the Sycamore TreeView over there.

You guys were doing such a great job discussing this, I didn't really need
to stick my two cents' worth in here. :-)

Robin S.
------------------------------------
"Bruce W. Darby" <kr******@atcomcast.netwrote in message
news:DZ******************************@comcast.com. ..
ROOOOOOOOOBIN,

Ollie Ollie Oxen Free...Free...Free... :)

Bruce

"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:4M******************************@comcast.com. ..
>There's only been one post by me (Robin) *in* this entire thread. Do you
see this one?

Robin S.
----------------------
"Scott M." <s-***@nospam.nospamwrote in message
news:OA**************@TK2MSFTNGP05.phx.gbl...
>>Must have. I don't see anything from Robin in this entire thread.
"Bruce W. Darby" <kr******@atcomcast.netwrote in message
news:e8******************************@comcast.co m...
Not sure Scott. Are you seeing other posts by Robin? Or did you
inadvertently add him to your killfile?

"Scott M." <s-***@nospam.nospamwrote in message
news:Oe**************@TK2MSFTNGP06.phx.gbl...
Hmmm, why don't I see Robin's message in this thread?
>
>
"Bruce W. Darby" <kr******@atcomcast.netwrote in message
news:VP******************************@comcast. com...
>I'll answer that for him, Robin.... because he CAN'T!! I'm coming to
>the conclusion that our neophyte troll doesn't know how to program.
>If he can't drag it and drop it, he's lost. Now, he COULD prove me
>wrong, but I doubt that he'll even attempt to. :)
>>
>Bruce
>>
>"RobinS" <Ro****@NoSpam.yah.nonewrote in message
>news:xs******************************@comcast .com...
>>Why don't you post some code samples that show the same thing
>>running in VB6 and VB2005 and show the performance statistics?
>>>
>>Robin S.
>>Ts'i mahnu uterna ot twan ot geifur hingts uto.
>>-----------------------------------------------
>>
>>
>
>




Feb 11 '07 #63
Welcome back. :)

"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:3I******************************@comcast.com. ..
Oh, there you are. I was hiding behind the Sycamore TreeView over there.

You guys were doing such a great job discussing this, I didn't really need
to stick my two cents' worth in here. :-)

Robin S.

Feb 11 '07 #64
Thanks! And thanks for not asking what I was doin' over there behind the
Sycamore. ;-)
Robin S.
--------------------------------
"Bruce W. Darby" <kr******@atcomcast.netwrote in message
news:KZ******************************@comcast.com. ..
Welcome back. :)

"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:3I******************************@comcast.com. ..
>Oh, there you are. I was hiding behind the Sycamore TreeView over there.

You guys were doing such a great job discussing this, I didn't really
need to stick my two cents' worth in here. :-)

Robin S.


Feb 11 '07 #65
"Zytan" <zy**********@yahoo.comwrote in news:1171055866.052844.204220
@h3g2000cwc.googlegroups.com:
I try to avoid global vars like the plague, as do most, so I cannot
see why anyone would still want to use this.
For redundant functions it doesn't make sent to need to instaniate
everytime just to use em :-)
Feb 11 '07 #66
On 2007-02-11, Spam Catcher <sp**********@rogers.comwrote:
"Zytan" <zy**********@yahoo.comwrote in news:1171055866.052844.204220
@h3g2000cwc.googlegroups.com:
>I try to avoid global vars like the plague, as do most, so I cannot
see why anyone would still want to use this.

For redundant functions it doesn't make sent to need to instaniate
everytime just to use em :-)
You don't need to - just make the methods/properties shared. For example
- System.Math. You don't have to create one to use it's functionality...

--
Tom Shelton
Feb 11 '07 #67
Tom,

Read the comments from Herfried and me, it is seldom that we agree so much,
so there must be something.

Cor

"Tom Shelton" <to*********@comcast.netschreef in bericht
news:11*********************@j27g2000cwj.googlegro ups.com...
On Feb 10, 9:01 pm, "Scott M." <s...@nospam.nospamwrote:
>"Tom Leylan" <tley...@nospam.netwrote in message

news:u3***************@TK2MSFTNGP06.phx.gbl...
Scott: I just don't know where you are coming from on this. Have you
tried placing Sub Main in a class and your command line switches didn't
work or are you imagining it could be problematic and avoiding it as
such?

I'm so sorry that you are having such a hard time Tom. To answer your
question, no I haven't. But, that what not the OP. Modules are
*another*
way of handling such things. I find them easier for these situations
than
custom classes. I find them quicker to set up and use than custom
classes
and I find them to make more sense from a *flow* standpoint in these
situations.

I'm sorry Scott, but you are making absolutely no sense here. The
fact is that it takes almost exactly the same amount of work to put
your sub main in a class as it does in a module. There is hardly any
difference here, except for the addition of the shared keyword on the
sub main - and that is what happens automatically if you use a module.

There is no situation that I can think of where a module is superior
or significantly easier then a class. That could be because I do 99%
of all my work in C#, and there is no concept of a module there...
The closest thing is the static class added in C#2.0 - which is a way
to get the compiler to enforce what most of us do anyway - create a
class with a private constructor and all static methods :)

Now, I'm not saying that you shouldn't use Modules. Your style is
your style. I don't use them when I do VB work, but that is my
choice. The only thing I object to in your statement is the
implication that it is more work to use a class.... Simply not true -
at least in any significant manner.

--
Tom Shelton

Feb 11 '07 #68
On Feb 11, 3:21 am, "Cor Ligthert [MVP]" <notmyfirstn...@planet.nl>
wrote:
Tom,

Read the comments from Herfried and me, it is seldom that we agree so much,
so there must be something.

Cor
Cor,

I have read both your comments - and I have to respectfully disagree
with them. Especially the notion by Herfried that a module is a loose
grouping of functions. In my mind a module should - like a class -
have single purpose. All functionality in that module should be
related - like a class.

Anyway, I'm not here to try and convince anyone to my way of
thinking. Everyone has their own style and their own ideas about how
things should be done. My idea is to avoid module and use a class
with shared methods - you and Herfried like to use modules. That's
ok. It was an interesting discussion at least :)

--
Tom Shelton

Feb 11 '07 #69
"Tom Shelton" <to*********@comcast.netschrieb:
I have read both your comments - and I have to respectfully disagree
with them. Especially the notion by Herfried that a module is a loose
grouping of functions. In my mind a module should - like a class -
have single purpose.
I don't disagree :-). The Visual Basic Runtime Library's function library
and its modules is IMO a good example on how using modules is a good idea.
It's pretty clear that using modules to group things that are not related to
each other is as useless as placing them in the same class.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Feb 11 '07 #70
Tom,

I think you misinterpret what we want to say.

A shared class is not a class, it is our opinion a created couple of words
(not even one) to describe a memory part with no object behaviour. That
while there is for that one nice word, what describes that "Module".
Therefore don't make it difficult for newbie's who want to learn what is
OOP. Use a class for a to instance object. Use Module for a piece of code
permanent and shareable in the program.

Cor

"Tom Shelton" <to*********@comcast.netschreef in bericht
news:11**********************@m58g2000cwm.googlegr oups.com...
On Feb 11, 3:21 am, "Cor Ligthert [MVP]" <notmyfirstn...@planet.nl>
wrote:
>Tom,

Read the comments from Herfried and me, it is seldom that we agree so
much,
so there must be something.

Cor

Cor,

I have read both your comments - and I have to respectfully disagree
with them. Especially the notion by Herfried that a module is a loose
grouping of functions. In my mind a module should - like a class -
have single purpose. All functionality in that module should be
related - like a class.

Anyway, I'm not here to try and convince anyone to my way of
thinking. Everyone has their own style and their own ideas about how
things should be done. My idea is to avoid module and use a class
with shared methods - you and Herfried like to use modules. That's
ok. It was an interesting discussion at least :)

--
Tom Shelton

Feb 11 '07 #71
Tom Shelton <to*********@comcastXXXXXXX.netwrote in
news:uO******************************@comcast.com:
>For redundant functions it doesn't make sent to need to instaniate
everytime just to use em :-)

You don't need to - just make the methods/properties shared. For
example
- System.Math. You don't have to create one to use it's
functionality...
Yes, I meant shared functions - I realized the ambiguity of my message
after I posted it.
Feb 11 '07 #72
On Feb 11, 5:58 am, "Cor Ligthert [MVP]" <notmyfirstn...@planet.nl>
wrote:
Tom,

I think you misinterpret what we want to say.

A shared class is not a class, it is our opinion a created couple of words
(not even one) to describe a memory part with no object behaviour.
I'm not so sure about that... Even SmallTalk has the concept of class
methods vs instance methods (at least, I am led to believe that - I
don't know SmallTalk myself). The idea of class methods (shared
methods) has been around for sometime.

Are they a fully OO concept? Hmmm... I would have to give that some
thought.
That
while there is for that one nice word, what describes that "Module".
Therefore don't make it difficult for newbie's who want to learn what is
OOP.
I'm not trying to make it difficult on anyone. It's obvioulsy a
concept that a lot of people have different oppinions on. And who is
right? I am not convinced yet that a shared (static) class is not an
OOP construct.
Use a class for a to instance object. Use Module for a piece of code
permanent and shareable in the program.
I will think about this some more. Maybe I'll agree with you :)

--
Tom Shelton

Feb 11 '07 #73
On Feb 11, 6:31 am, "Herfried K. Wagner [MVP]" <hirf-spam-me-
h...@gmx.atwrote:
"Tom Shelton" <tom_shel...@comcast.netschrieb:
I have read both your comments - and I have to respectfully disagree
with them. Especially the notion by Herfried that a module is a loose
grouping of functions. In my mind a module should - like a class -
have single purpose.

I don't disagree :-). The Visual Basic Runtime Library's function library
and its modules is IMO a good example on how using modules is a good idea.
It's pretty clear that using modules to group things that are not related to
each other is as useless as placing them in the same class.
Then we are in agreement for the most part :) I'm not so sure that I
would ever prefer a module over a class yet though....

--
Tom Shelton

Feb 11 '07 #74
I see this one. Perhaps you replied to someone that I have on my kill list
so I didn't see that branch!
"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:4M******************************@comcast.com. ..
There's only been one post by me (Robin) *in* this entire thread. Do you
see this one?

Robin S.
----------------------
"Scott M." <s-***@nospam.nospamwrote in message
news:OA**************@TK2MSFTNGP05.phx.gbl...
>Must have. I don't see anything from Robin in this entire thread.
"Bruce W. Darby" <kr******@atcomcast.netwrote in message
news:e8******************************@comcast.com ...
>>Not sure Scott. Are you seeing other posts by Robin? Or did you
inadvertently add him to your killfile?

"Scott M." <s-***@nospam.nospamwrote in message
news:Oe**************@TK2MSFTNGP06.phx.gbl...
Hmmm, why don't I see Robin's message in this thread?
"Bruce W. Darby" <kr******@atcomcast.netwrote in message
news:VP******************************@comcast.c om...
I'll answer that for him, Robin.... because he CAN'T!! I'm coming to
the conclusion that our neophyte troll doesn't know how to program. If
he can't drag it and drop it, he's lost. Now, he COULD prove me wrong,
but I doubt that he'll even attempt to. :)
>
Bruce
>
"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:xs******************************@comcast. com...
>Why don't you post some code samples that show the same thing running
>in VB6 and VB2005 and show the performance statistics?
>>
>Robin S.
>Ts'i mahnu uterna ot twan ot geifur hingts uto.
>-----------------------------------------------
>
>




Feb 11 '07 #75
Yes, it was a response to Aaron Kempf. Otherwise, I didn't feel you guys
needed any help discussing this issue; you were doing great without my
input. ;-)

Robin S.
---------------------------
"Scott M." <s-***@nospam.nospamwrote in message
news:uW**************@TK2MSFTNGP06.phx.gbl...
>I see this one. Perhaps you replied to someone that I have on my kill
list so I didn't see that branch!
"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:4M******************************@comcast.com. ..
>There's only been one post by me (Robin) *in* this entire thread. Do you
see this one?

Robin S.
----------------------
"Scott M." <s-***@nospam.nospamwrote in message
news:OA**************@TK2MSFTNGP05.phx.gbl...
>>Must have. I don't see anything from Robin in this entire thread.
"Bruce W. Darby" <kr******@atcomcast.netwrote in message
news:e8******************************@comcast.co m...
Not sure Scott. Are you seeing other posts by Robin? Or did you
inadvertently add him to your killfile?

"Scott M." <s-***@nospam.nospamwrote in message
news:Oe**************@TK2MSFTNGP06.phx.gbl...
Hmmm, why don't I see Robin's message in this thread?
>
>
"Bruce W. Darby" <kr******@atcomcast.netwrote in message
news:VP******************************@comcast. com...
>I'll answer that for him, Robin.... because he CAN'T!! I'm coming to
>the conclusion that our neophyte troll doesn't know how to program.
>If he can't drag it and drop it, he's lost. Now, he COULD prove me
>wrong, but I doubt that he'll even attempt to. :)
>>
>Bruce
>>
>"RobinS" <Ro****@NoSpam.yah.nonewrote in message
>news:xs******************************@comcast .com...
>>Why don't you post some code samples that show the same thing
>>running in VB6 and VB2005 and show the performance statistics?
>>>
>>Robin S.
>>Ts'i mahnu uterna ot twan ot geifur hingts uto.
>>-----------------------------------------------
>>
>>
>
>




Feb 11 '07 #76
Ah, that must be it since I don't see any messages from Aaron either.
"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:TM******************************@comcast.com. ..
Yes, it was a response to Aaron Kempf. Otherwise, I didn't feel you guys
needed any help discussing this issue; you were doing great without my
input. ;-)

Robin S.
---------------------------
"Scott M." <s-***@nospam.nospamwrote in message
news:uW**************@TK2MSFTNGP06.phx.gbl...
>>I see this one. Perhaps you replied to someone that I have on my kill
list so I didn't see that branch!
"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:4M******************************@comcast.com ...
>>There's only been one post by me (Robin) *in* this entire thread. Do you
see this one?

Robin S.
----------------------
"Scott M." <s-***@nospam.nospamwrote in message
news:OA**************@TK2MSFTNGP05.phx.gbl...
Must have. I don't see anything from Robin in this entire thread.
"Bruce W. Darby" <kr******@atcomcast.netwrote in message
news:e8******************************@comcast.c om...
Not sure Scott. Are you seeing other posts by Robin? Or did you
inadvertently add him to your killfile?
>
"Scott M." <s-***@nospam.nospamwrote in message
news:Oe**************@TK2MSFTNGP06.phx.gbl.. .
>Hmmm, why don't I see Robin's message in this thread?
>>
>>
>"Bruce W. Darby" <kr******@atcomcast.netwrote in message
>news:VP******************************@comcast .com...
>>I'll answer that for him, Robin.... because he CAN'T!! I'm coming to
>>the conclusion that our neophyte troll doesn't know how to program.
>>If he can't drag it and drop it, he's lost. Now, he COULD prove me
>>wrong, but I doubt that he'll even attempt to. :)
>>>
>>Bruce
>>>
>>"RobinS" <Ro****@NoSpam.yah.nonewrote in message
>>news:xs******************************@comcas t.com...
>>>Why don't you post some code samples that show the same thing
>>>running in VB6 and VB2005 and show the performance statistics?
>>>>
>>>Robin S.
>>>Ts'i mahnu uterna ot twan ot geifur hingts uto.
>>>-----------------------------------------------
>>>
>>>
>>
>>
>
>




Feb 12 '07 #77
And I bet you miss that, don't you? ;-)

Robin S.
-----------------------------
"Scott M." <s-***@nospam.nospamwrote in message
news:eb**************@TK2MSFTNGP03.phx.gbl...
Ah, that must be it since I don't see any messages from Aaron either.
"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:TM******************************@comcast.com. ..
>Yes, it was a response to Aaron Kempf. Otherwise, I didn't feel you guys
needed any help discussing this issue; you were doing great without my
input. ;-)

Robin S.
---------------------------
"Scott M." <s-***@nospam.nospamwrote in message
news:uW**************@TK2MSFTNGP06.phx.gbl...
>>>I see this one. Perhaps you replied to someone that I have on my kill
list so I didn't see that branch!
"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:4M******************************@comcast.co m...
There's only been one post by me (Robin) *in* this entire thread. Do
you see this one?

Robin S.
----------------------
"Scott M." <s-***@nospam.nospamwrote in message
news:OA**************@TK2MSFTNGP05.phx.gbl...
Must have. I don't see anything from Robin in this entire thread.
>
>
"Bruce W. Darby" <kr******@atcomcast.netwrote in message
news:e8******************************@comcast. com...
>Not sure Scott. Are you seeing other posts by Robin? Or did you
>inadvertently add him to your killfile?
>>
>"Scott M." <s-***@nospam.nospamwrote in message
>news:Oe**************@TK2MSFTNGP06.phx.gbl. ..
>>Hmmm, why don't I see Robin's message in this thread?
>>>
>>>
>>"Bruce W. Darby" <kr******@atcomcast.netwrote in message
>>news:VP******************************@comcas t.com...
>>>I'll answer that for him, Robin.... because he CAN'T!! I'm coming
>>>to the conclusion that our neophyte troll doesn't know how to
>>>program. If he can't drag it and drop it, he's lost. Now, he COULD
>>>prove me wrong, but I doubt that he'll even attempt to. :)
>>>>
>>>Bruce
>>>>
>>>"RobinS" <Ro****@NoSpam.yah.nonewrote in message
>>>news:xs******************************@comca st.com...
>>>>Why don't you post some code samples that show the same thing
>>>>running in VB6 and VB2005 and show the performance statistics?
>>>>>
>>>>Robin S.
>>>>Ts'i mahnu uterna ot twan ot geifur hingts uto.
>>>>-----------------------------------------------
>>>>
>>>>
>>>
>>>
>>
>>
>
>




Feb 12 '07 #78
My point is that a class (in Dutch the word is almost the same and has the
same meaning as in English) tells something about a type. A shared class
tells nothing, it is a stand alone object not something that describes a
group.

A module is a much better name for me for that.

For me it is more that it is not the right word in C languages as well. I
would propose to call it there as well modules.

Cor
I agree with this. Classes are types. Modules are just a list of
functions, there is no type. I think C languages should have this
term, as well. It suits what it actually is much better. (Or...
allow classes to 'be' modules in that sense, without required 'hacks'
by making everything 'shared' / 'static'. I think a new name, Module,
is better than this idea.)

But... am I just stupid, or do Modules place everything into the
global namespace? This is what I dislike about them. So, I'll use
classes, instead, for this one reason alone.

Zytan
Feb 12 '07 #79
VB6 was pre-.Net. Technically, it had classes, but not true OO
capabilities.

Robin S.
Understood. Thanks for the replies everyone.

Zytan
Feb 12 '07 #80
Zytan wrote:
<snip>
do Modules place everything into the
global namespace? This is what I dislike about them. So, I'll use
classes, instead, for this one reason alone.
<snip>

Yes, modules do put all public elements in the "global" namespace they
belong.

Note, however, that while a module is usually placed at the project's
namespace, it doesn't need to be so. A module in a specific namespace
won't appear globally in the project's namespace, only in the
immediate namespace the module is contained. Outside the namespace
you'd still need to prefix the method call with the namespace -- or
import the namespace altogether.

<aircode>
Namespace Globals
Module SomeModule
Sub SomeSub
'...
End Sub
End Module
End Module

Class SomeClass
Sub New
SomeSub '<-- Error
Globals.SomeSub '<-- Ok
Globals.SomeModule.SomeSub '<-- Ok, also
End Sub
End Class

'In another file
Imports Globals

Class SomeOtherClass
Sub New
SomeSub '<-- Ok
SomeModule.SomeSub '<-- ditto
End Sub
End Class
</aircode>

If this behavior isn't what you want, I suggest you use shared methods
in classes, then.

On the other side, if "global" methods is exactly what you want, or
you don't care because you'd Import the class anyway (making the
shared methods global), or still, you want global methods inside a
specific namespace, then go ahead and use a module, instead.

HTH.

Regards,

Branco.

Feb 12 '07 #81
Yes, modules do put all public elements in the "global" namespace they
belong.

Note, however, that while a module is usually placed at the project's
namespace, it doesn't need to be so. A module in a specific namespace
won't appear globally in the project's namespace, only in the
immediate namespace the module is contained. Outside the namespace
you'd still need to prefix the method call with the namespace -- or
import the namespace altogether.

<snip>

If this behavior isn't what you want, I suggest you use shared methods
in classes, then.

On the other side, if "global" methods is exactly what you want, or
you don't care because you'd Import the class anyway (making the
shared methods global), or still, you want global methods inside a
specific namespace, then go ahead and use a module, instead.

HTH.
Branco, yes, this helps a lot. Thanks for your very informative
post. I had thought about making modules in namespaces, but I am not
comfortable with it due to lack of experience. But, I can see how
this helps. I guess the lack of need to use the module name itself
throws me off, even in this case. Yes, the namespace is required
(unless you use Imports), but the module name can always be missing.
I suppose most people use Imports for many things, though, and they
are used to this.

In any case, thanks for the in depth reply.

Zytan

Feb 12 '07 #82
Zytan wrote:
<snip>
I guess the lack of need to use the module name itself
throws me off, even in this case. Yes, the namespace is required
(unless you use Imports), but the module name can always be missing.
I suppose most people use Imports for many things, though, and they
are used to this.
<snip>

I think that simply importing a namespace into the file is evil (or
something close to it). My (personal, mind you) rule of thumb is, if I
must use Imports, then I must create an alias to it:

Imports SysThread = System.Threading
Imports SysRegex = System.Text.RegularExpression

As opposed to:

Imports System.Threading
Imports System.Text.RegularExpression

Don't know if this relates to what you're talking about, and my
apologies if it drifts to OT.

Regards,

Branco.

Feb 12 '07 #83
that would sure be interesting to me

so I can make a class named 'aaron' and I can put functions in it..
and I can reuse those functions without instantiating a class?

I just don't like all of the dependencies between that style of
writing; it makes me sick to think about it
Feb 12 '07 #84
I don't need to

startup a vb6 forms app.. and startup a vb 2005 forms app

it's obvious to me which is faster
Feb 12 '07 #85
clutter the global namespace?

are you fucking kidding me?

does this make the app slower?

does it make carol in accounting enter data _FASTER_ ??

Feb 12 '07 #86
yeah

module aaron

module matt

I can refer to aaron.method1 or matt.method2 just as easily as with a
class; but I don't need to instantiate an instance of the class first
Feb 12 '07 #87
Cor

I strongly

I militantly, agree

80% of VB6 developers 'never used a class' why did we need to get this
crap shoved down our throats?

Feb 12 '07 #88
are you fuckin kidding me bro?

you think that vb6 was build on a prior version of the .net runtime?

ROFL

yeah, vb6 had classes; it didn't support inheritence

but I'm over it

taking a module and pasting it into a class and adding 2 lines of code
does _NOTHING_ for you.
I had a co-worker who used to do that and my stupid fucking manager
thought that he was such a great programmer--- because he used clases

and I was like 'uh, he has no error-handling, he has no structure, no
consistency'

and she didn't give a crap; all she liked was that it was a class

it kinda blew my mind; I thoght that it wa hilarious

he would take a module and paste it into a class without rewriting the
module into logical methods; he wouldn't even make anything private;
it was the ugliest code i've ever seen in my life

little prissy kid named 'craig'

Feb 12 '07 #89
lloyd

I just said that 80% of vb6 programmers 'never used a class'

why did we need to get enlightened?

does moving to classes make our code faster?

Feb 12 '07 #90
Tom

I am so sorry that you had a fag computer science professor

it doesn't mean that classes make your code run faster
it doesn't simplify

and it doesn't support reuse

Feb 12 '07 #91
tom

the basic variable naming convention was from the friggin 80s dude; I
mean.. nobody used that recently; except one kid I knew in insurance;
he still used that

and it wasn't a matter that string variables _MUST_ end with a $
symbol

I just found this great book about basic; it is literally from 1982..
it reminds me of the good ole days

it's got the best illustrations in it
Feb 12 '07 #92
because robin is a flamer

she doesn't stay on topic
Feb 12 '07 #93
Scott;

re: 1.5mb runtime; keep on preaching the good word, bro

maybe someday the framework will get under 10mb

-Aaron

Feb 12 '07 #94
no dude

an extra minute here and there adds up

that is why I can out-develop you with my hands tied behind my back

-Aaron

Feb 12 '07 #95
tom

if you're a c# fag then get the fuck out of my newsgroup

C# is to fight java; which I claim was 'never a threat'

-Aaron

Feb 12 '07 #96
fully agree spam catcher

I mean-- it's really obvious to me that modules should be used
whenever possible so you don't need 12 different copies of the same
method

(since vb 2005 and c# don't support polymorphism)

On Feb 11, 12:43 am, Spam Catcher <spamhoney...@rogers.comwrote:
"Zytan" <zytanlith...@yahoo.comwrote in news:1171055866.052844.204220
@h3g2000cwc.googlegroups.com:
I try to avoid global vars like the plague, as do most, so I cannot
see why anyone would still want to use this.

For redundant functions it doesn't make sent to need to instaniate
everytime just to use em :-)

Feb 12 '07 #97
That's news to me. I use polymorphism in both VB 2005 and C# 2005. Maybe
what you really mean is that both languages require (optional in VB 2005)
strongly typed parameter passing and VB 6 and earlier let you write sloppy
code that you had to runtime check every single parameter.

Mike Ober.

<aa*********@gmail.comwrote in message
news:11*********************@p10g2000cwp.googlegro ups.com...
fully agree spam catcher

I mean-- it's really obvious to me that modules should be used
whenever possible so you don't need 12 different copies of the same
method

(since vb 2005 and c# don't support polymorphism)

On Feb 11, 12:43 am, Spam Catcher <spamhoney...@rogers.comwrote:
>"Zytan" <zytanlith...@yahoo.comwrote in news:1171055866.052844.204220
@h3g2000cwc.googlegroups.com:
I try to avoid global vars like the plague, as do most, so I cannot
see why anyone would still want to use this.

For redundant functions it doesn't make sent to need to instaniate
everytime just to use em :-)


Feb 12 '07 #98
BK
On Feb 12, 12:41 pm, "aaron.ke...@gmail.com" <aaron.ke...@gmail.com>
wrote:
fully agree spam catcher

I mean-- it's really obvious to me that modules should be used
whenever possible so you don't need 12 different copies of the same
method

(since vb 2005 and c# don't support polymorphism)
Sure they do, in VB look up Overload for starters.

Feb 12 '07 #99
"Zytan" <zy**********@yahoo.comschrieb:
Branco, yes, this helps a lot. Thanks for your very informative
post. I had thought about making modules in namespaces, but I am not
comfortable with it due to lack of experience. But, I can see how
this helps. I guess the lack of need to use the module name itself
throws me off, even in this case. Yes, the namespace is required
(unless you use Imports), but the module name can always be missing.
I suppose most people use Imports for many things, though, and they
are used to this.
Personally I import all namespaces containing types I am using. I hate
namespace-qualified types inside the implementation because they blow up
code resulting in very long lines. In general I qualify types (classes,
structures, ...) and functions (in modules) only if there would be a name
clash otherwise.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Feb 12 '07 #100

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Brad Tilley | last post by:
I don't understand classes very well... maybe some day. Is it just me or are they supposed to be difficult to understand? They make my head hurt. Anyway, because I don't understand classes well,...
8
by: Rob Snyder | last post by:
Greetings - I have a situation where I need to be able to have a Python function that will take all the modules in a given directory and find all the classes defined in these modules by name....
3
by: Javi | last post by:
I have some doubts about what is the best method to distribute classes in .cpp and .h files: - Should I use a file per class? or should I group similar classes in one file? - Is it good to put a...
8
by: JackRazz | last post by:
Is it possible to create a static class in vb.net like c# does? I want the code to create a single global instance of a class that is inherited from another class. I could use a module, but I...
5
by: Erik Cruz | last post by:
Hello! I have read some threads discussing the fact that a module is in reality a shared class. If I try to create a Public Shared Class in vb.net I receive a compile error. Why? If I can't...
11
by: John Salerno | last post by:
From my brief experience with C#, I learned that it was pretty standard practice to put each class in a separate file. I assume this is a benefit of a compiled language that the files can then be...
16
by: tshad | last post by:
This is a little complicated to explain but I have some web services on a machine that work great. The problem is that I have run into a situation where I need to set up my program to access one...
5
by: Alex | last post by:
Hi, this is my first mail to the list so please correct me if Ive done anything wrong. What Im trying to figure out is a good way to organise my code. One class per .py file is a system I like,...
12
by: Janaka Perera | last post by:
Hi All, We have done a object oriented design for a system which will create a class multiply inherited by around 1000 small and medium sized classes. I would be greatful if you can help me...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.