using classes vs. modules

  • Thread starter Thread starter Andy B.
  • Start date Start date
Tom Shelton said:
If you say, so. I just don't see that big a difference - other then VB.NET
has a formalized concept of raising an event, C# treats it as a method call
(sort of). Different symantics, same result.

And under the hood Properties are just procedures and functions that
take or return a value. But thinking of them as functions or
procedures is just wrong, it messes up the conceptual framework and
leads to properties that do things unrelated to setting or getting the
underlying value.

Same thing for events, while you can call them without raising the
event, you shouldn't, and thinking of them as delegates will lead to
doing so.

(BTW, for the most part I don't choose a language I work with whatever
choice has already been made).
 
And under the hood Properties are just procedures and functions that
take or return a value. But thinking of them as functions or
procedures is just wrong, it messes up the conceptual framework and
leads to properties that do things unrelated to setting or getting the
underlying value.

That happens, no matter what. There are all kinds of bad things that people
do. Public/Protected members fields, optional parameters in public
interfaces, etc, etc, etc.
Same thing for events, while you can call them without raising the
event, you shouldn't, and thinking of them as delegates will lead to
doing so.

I have never seen it done by a professional developer. I think that most
programmers are smarter then that.
 
Tom,

In my idea you forget one thing, An event is always in the right use in an
assynchronous situation.

Probably you will return as reply that is no problem in C# at all. You are
right that it is as well not in Intel Assembler, however, in VB an event is
put on a more important level in the language. VB is for years a program
language for in detail dialog driven programs. C++ is used a long time for
more mathimetical problems.

Cor
 
Tom Shelton said:
I have never seen it done by a professional developer. I think that most
programmers are smarter then that.

You've been lucky. I've seen professional developers do no end of stupid
things.

Michael
 
Harald M. Genauck said:
Which site do you mean?

I cannot believe that they include VB6 and VBA, because VB6 never had a
free downloadable Express version, and VBA never has been a separate
available product.

The site that was quoted a few posts back, it gets brought up here quite a
bit. It only takes a little digging to find out they are including vb6,
vb.net, vba and other forms of VB yet when they mention C# they don't
include C++, C and all the flavours of embedded C. Not that they should of
course but they should let vb.net stand alone.

Michael
 
Tom,

In my idea you forget one thing, An event is always in the right use in an
assynchronous situation.

Probably you will return as reply that is no problem in C# at all. You are
right that it is as well not in Intel Assembler, however, in VB an event is
put on a more important level in the language. VB is for years a program
language for in detail dialog driven programs. C++ is used a long time for
more mathimetical problems.

Cor,

It is not a problem in C# anymore then it is a problem in VB.NET. Events are
a first class part of C# - it just has different symantics for the raising of
events - no RaiseEvent keyword. But, that should be expected - they are
different languages. To be honest, I'm not even sure why this is even a
point of dicussion...

I get it that you love VB. That's fine, I have no problems with that at all.
I don't mind VB either - I worked as a VB programmer for several years before
and maintained VB code for several years after moving to C#. I was a VB MVP.
None of what I have said was ment to insult the VB language, nor to imply that
C# is superior. I have a prefence for C-style syntax - some people like case
sensitivity and {} :)

I don't know why you keep comparing C# to assembly or C++. While the syntax
is similar to C++ - it is not C++. It is a RAD tool - with pretty much the
same feature set as VB, just with a different syntax.
 
Tom,

That history you described from you is relative clear to me, even one
message when I became very angry which you once wrote, is still in my mind,
and as you probably know is one of my hopes that you become soon a MVP
again. I use very much C# so don't think that my ideas are based on just
like what we see in the VB classic newsgroups. My idea is however still,
that VB produces quicker and cleaner code. As C# is in my opinion as good as
VB then I will probably too say, I love C#.

I don't know what religion you have. But I take the chance, and tell that
this year of Darwin who told that everything has its orgin.

Assembler is the base of practical all program languages. C# has its roots
in C languages, however in my idea very much from VB languages.

VB has its root in a long linke of Basic languages, however in the versions
from this millenium as well.

You never can see problems taken syntetical out of its roots. The base of a
language is much more dependend then only visible things as a semicolumn or
a bracket.

That is why I often use Intel Assembler and C++ as the roots of C# (although
like in this message I include often VB as well in the roots from C#)

I hope this declares a little bit why I use this very often.

Cor
 
Tom Shelton said:
It is not a problem in C# anymore then it is a problem in VB.NET. Events
are
a first class part of C# - it just has different symantics for the raising
of
events - no RaiseEvent keyword.

I disagree. VB's support for events as they are defined/supported by the
CLI is more complete than C#'s support. Note that this has not been the
case until custom events were added to VB.
 
I disagree. VB's support for events as they are defined/supported by the
CLI is more complete than C#'s support. Note that this has not been the
case until custom events were added to VB.

Why? Because the C# compiler doesn't emmit a .fire? .fire is not
required....
 
Tom Shelton said:
Why? Because the C# compiler doesn't emmit a .fire? .fire is not
required....

Even event customization is often not required. Properties are not required
too. ...

..NET's more than C#! It's all about language interoperability (derived
classes might be written in another .NET language providing support for
'.fire').
 
Harald M. Genauck said:
A few posts back in this thread? Or in another thread?

It was mentioned in this thread I believe.
Where may I start to search for it?

In this thread. Although it appears that Jason was quoting a different
source "more popular than C# (counted by downloads of Express versions)"
which is clearly another rubbish figure as it looks at only the free
version. All that figure really does is prove my point that VB is aimed at
beginners (the pros would be more likely to purchase VS, beginners more
likely to download a free version).


Michael
 
Michael said:
It was mentioned in this thread I believe.


In this thread. Although it appears that Jason was quoting a different
source "more popular than C# (counted by downloads of Express versions)"
which is clearly another rubbish figure as it looks at only the free
version. All that figure really does is prove my point that VB is aimed at
beginners (the pros would be more likely to purchase VS, beginners more
likely to download a free version).


Michael

I'm guessing Michael was referring to
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
whereas I was using an article referenced (#5) on
http://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Visual_Basic_.NET

As Michael says, it's difficult to know which language is the most
popular. Going by book sales, apparently C# is more popular. Of course,
this could also mean that new C# programmers need help, whereas new
Visual Basic (.NET) programmers don't.

But, as I've suggested before, it doesn't matter which is more popular -
we know VB is better! <g>

Or, should we all be busily learning F# or M (see Oslo)?
 
I'm guessing Michael was referring to
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
whereas I was using an article referenced (#5) on
http://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Visual_Basic_.NET

As Michael says, it's difficult to know which language is the most
popular. Going by book sales, apparently C# is more popular. Of course,
this could also mean that new C# programmers need help, whereas new
Visual Basic (.NET) programmers don't.

But, as I've suggested before, it doesn't matter which is more popular -
we know VB is better! <g>

Or, should we all be busily learning F# or M (see Oslo)?

The bit I've seen of F# it does seem interesting...
 

Ok, I see that Tiobe does make a difference between the various kinds
of VB. (As there is no splitting up between C++ and C++/CLI).
whereas I was using an article referenced (#5) on
http://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Visual_Basic_.NET

As Michael says, it's difficult to know which language is the most
popular. Going by book sales, apparently C# is more popular. Of
course, this could also mean that new C# programmers need help,
whereas new Visual Basic (.NET) programmers don't.

I believe it's a kind of a 'self fulfilling prophecy'...


Harald M. Genauck

"VISUAL STUDIO one" - http://www.visualstudio1.de
"ABOUT Visual Basic" - http://www.aboutvb.de
 
Michael C said:
It was mentioned in this thread I believe.


In this thread. Although it appears that Jason was quoting a
different source "more popular than C# (counted by downloads of
Express versions)" which is clearly another rubbish figure as it
looks at only the free version. All that figure really does is prove
my point that VB is aimed at beginners (the pros would be more likely
to purchase VS, beginners more likely to download a free version).

That's not a correct conclusion. The fact that VB seems to give more
comfort to beginners does not implicitely say that it is aimed at
beginners.

Any technology should be comfortably to be learned by beginners, and
from that point of view, it is a clear lack of C# that it is much more
difficult for beginners.


Harald M. Genauck

"VISUAL STUDIO one" - http://www.visualstudio1.de
"ABOUT Visual Basic" - http://www.aboutvb.de
 
Harald M. Genauck said:
That's not a correct conclusion. The fact that VB seems to give more
comfort to beginners does not implicitely say that it is aimed at
beginners.

So you're saying the designers accidentally aimed it at beginners? :-)
Any technology should be comfortably to be learned by beginners, and from
that point of view, it is a clear lack of C# that it is much more
difficult for beginners.

In any product the designers have choices whether to aim the features at
beginners or experts. To a degree they can do both but not always. The very
syntax of VB is designed for beginners because experts don't need to see
"Dim X as String". They just need the bare minimum which is "X" and
"string". There's a whole list of differences between VB and C# that show VB
is more aimed at beginners. If points and unsafe code doesn't give it away
I'm not sure what would.

Michael
 
Michael C said:
So you're saying the designers accidentally aimed it at beginners? :-)

A tool which is easy to use (and thus suitable for beginners) and which
provides the same features as another tool which beginners cannot use easily
is superior because it will (1) get more attention from beginners who will
turn into professionals once and (2) it will also be easier to use for
professionals.
In any product the designers have choices whether to aim the features at
beginners or experts. To a degree they can do both but not always. The
very syntax of VB is designed for beginners because experts don't need to
see "Dim X as String". They just need the bare minimum which is "X" and
"string".

It seems that you are not familiar with the way human visual perception
works. I doubt that any VB developer scans source code on a
character-by-character basis.
 
So you're saying the designers accidentally aimed it at beginners?
:-)

It is aimed at beginners _and_ professionals _too_. Nobody ever said
that it is primarily aimed at beginners, or _only_ aimed at beginners.
In any product the designers have choices whether to aim the features
at beginners or experts. To a degree they can do both but not always.
The very syntax of VB is designed for beginners because experts don't
need to see "Dim X as String". They just need the bare minimum which
is "X" and "string".

So you think, professional may (or must) not have comfort, because they
are not dependent on comfort and because they can work without comfort?
There's a whole list of differences between VB and C# that show VB is
more aimed at beginners.

VB is more than C#, sure. ;-)
Because it addresses beginners _and_ experienced developers side by
side.


Harald M. Genauck

"VISUAL STUDIO one" - http://www.visualstudio1.de
"ABOUT Visual Basic" - http://www.aboutvb.de
 
Harald M. Genauck said:
It is aimed at beginners _and_ professionals _too_. Nobody ever said that
it is primarily aimed at beginners, or _only_ aimed at beginners.

If it's aimed at beginners and professionals they why didn't they add
pointers to VB? The beginners don't need to use the pointers so it doesn't
cause them any trouble but the experts can still use them. Same goes with
the yield return keyword, writing your own linq extensions is a slightly
advanced topic which they thought was not necessary for beginners.
So you think, professional may (or must) not have comfort, because they
are not dependent on comfort and because they can work without comfort?

Pretty much, the pro does not need the comfort of all the extra words, it's
just unecessary and slows them down.
Because it addresses beginners _and_ experienced developers side by side.

I noticed both you or Herfried snipped my point about pointers and unsafe
code. If VB is aimed at pros then why is it missing "the" biggest pro
feature of all time?

Michael
 
Back
Top