VB.NET or C#.NET ???

I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

Herfried K. Wagner said:
I believe 'Overridable' is more meaningful than 'virtual' and
'MustInherit' is more meaningful than 'abstract'. 'virtual' and
'abstract' are far too generic and not self-explaining.

Just check the other posts here, for a non english speaking person they are
not that meaningful in the first place. also virtual & abstract are
universaly used , all the books use them as well as all the mainstream
languages.

IMHO vb should take the chances of a new start and be more like the rest of
the languages when it transisionate to managed code. It's fairly common that
you need to modify or even program in either language, I do that all the
time lately :( and sometimes I just forget what the virtual's equivalent is
in vb.net

but again, nothing is worse than the _ at the end of the line to split an
instruction, does anybody has any info of why it was carried out to vb.net ?
 
T

Terry Burns

I agree regading some of the keywords, they are themselves to some degree
'Abstract'.
 
C

Cor Ligthert [MVP]

Jon,

I have a complete different opinion as you (you are not surprised I assume).
I have the idea that C# has inherited many program-words from the
intermediate machine-symbolic language as the first C was.

I prefer program languages which are not based on a kind of
technical/physical behaviour of the computer. Those programs do remind me
about the time when I was plugging cables in boards and I am glad that time
is gone.

To show what I mean with the most used example in these discussions Static
and Shared.

Static means for me something that it is always on the same place with a non
changeable content.
Shared means for me something that it is by more to use.

The first don't let me think on a program however on a hardware device where
that is stored, a not in a ROM fixed program is for me not direct static.

Shared means for me a memory area which is useable by more and describes it
very nice.

I have not any problem by the way with Static in C# because that is used
because of legacy reasons. However I am glad they took (because they were
able to do that) another word meaningful word in VBNet for that.

Before you misunderstand me, I am not glad with all program words in VBNet,
however because of what I wrote before should that in my opinion surely not
be criticezed by persons biased on C#.

Just my two now worthless Dutch cents,

Cor.
 
C

Cor Ligthert [MVP]

Terry,

Probably a very interesting page for you.

http://www.levenez.com/lang/history.html#01

Interesting to see on this page is how more consistent the on English
language based program-languages are than the mathametical ones.

I personal find the one line in basic as well not nice, however to start
talking about that the underscore is bad to use, is for me a little bit
childness argument.

They are in my idea for sure on every Latin character keyboard in the world,
from which I am not so sure as that is with bracelets. And so we can go on
and on with trying to find for the result absolute not important arguments.

:)

Cor
 
J

Jon Skeet [C# MVP]

Cor Ligthert said:
I have a complete different opinion as you (you are not surprised I assume).
I have the idea that C# has inherited many program-words from the
intermediate machine-symbolic language as the first C was.

I prefer program languages which are not based on a kind of
technical/physical behaviour of the computer. Those programs do remind me
about the time when I was plugging cables in boards and I am glad that time
is gone.

To show what I mean with the most used example in these discussions Static
and Shared.

Static means for me something that it is always on the same place with a non
changeable content.
Shared means for me something that it is by more to use.

Well, Shared has a connotation (to me) of "for more than one thing" -
which goes along with the idea that a shared/static variable is shared
by all instances, whereas in fact it's independent of *any* instance,
and there don't need to be any instances at all to be used.

The ironic thing is that you say that "static" is a C legacy, but it
means something totally different in C, which indeed it would have to
as C doesn't even have the concept of an instance.

Your argument would have been more convincing if you'd said C++.

I have not any problem by the way with Static in C# because that is used
because of legacy reasons. However I am glad they took (because they were
able to do that) another word meaningful word in VBNet for that.

Well, see the above.
Before you misunderstand me, I am not glad with all program words in VBNet,
however because of what I wrote before should that in my opinion surely not
be criticezed by persons biased on C#.

Hang on a sec - you say that someone who likes C# shouldn't criticise
VB.NET, but you're quite happy (as someone who likes VB.NET) to
criticise the choice of keywords in C#? That doesn't seem entirely fair
to me.

I a criticism of the choice of VB.NET keywords is necessarily affected
by the person who is making the criticism. A well-considered criticism
is better than a hasty criticism regardless of the authors of those
criticisms.
 
J

Jon Skeet [C# MVP]

Before you misunderstand me, I am not glad with all program words in VBNet,
however because of what I wrote before should that in my opinion surely not
be criticezed by persons biased on C#.

In addition to the previous comments, another reason why VB.NET might
have been better off taking the more common keywords: the framework
uses them too:

MethodInfo.IsStatic
Type.IsAbstract

etc

In other words, a VB.NET programmer is going to have to understand the
more common keywords anyway, in order to use the framework to its best.
It would surely have been easier for a VB.NET programmer to find
IsStatic if the keyword had been Static rather than Shared.

The VB.NET designers seem to have decided to go against terms used in
many, many places pretty much just for the sake of it, IMO.
 
J

Jon Skeet [C# MVP]

I personal find the one line in basic as well not nice, however to start
talking about that the underscore is bad to use, is for me a little bit
childness argument.

They are in my idea for sure on every Latin character keyboard in the world,
from which I am not so sure as that is with bracelets. And so we can go on
and on with trying to find for the result absolute not important arguments.

Where did anyone complain about the choice of character? As I read it,
the complaint was that it was necessary to use anything at all to
signify a continuation onto the next line, not the particular character
chosen to represent it.
 
C

Cor Ligthert [MVP]

Jon,
Hang on a sec - you say that someone who likes C# shouldn't criticise
VB.NET, but you're quite happy (as someone who likes VB.NET) to
criticise the choice of keywords in C#? That doesn't seem entirely fair
to me.

No I do not, you probably forgot the text I wrote (see below). By the way, I
don't find C# a bad program language, I don't know where you got that idea.
I find at least for UI type programs VBNet better, which text means direct
that there are in my opinion things that can better be done with C# or any
other C language.

For you is legacy maybe a bad word, for me it is affected with backward
compatibility. Maybe should I have used that. However I could not resist :)

:)

Cor
 
H

Herfried K. Wagner [MVP]

Ignacio Machin ( .NET/ C# MVP ) said:
Just check the other posts here, for a non english speaking person they
are not that meaningful in the first place.

I am a native German speaker and I find them more meaningful.
'Overridable'/'Overrides' is more consistent than 'virtual'/'override' as is
'MustInherit'/'Inherits' vs. 'abstract'/' said:
also virtual & abstract are universaly used , all the books use them
as well as all the mainstream languages.

Well, but that's not a guarantee that those terms are a good choice.
but again, nothing is worse than the _ at the end of the line to split an
instruction, does anybody has any info of why it was carried out to vb.net
?

Who knows...
 
H

Herfried K. Wagner [MVP]

Ignacio Machin ( .NET/ C# MVP ) said:
I beg to differ , all the books about OOP use abstract and virtual in
fact I think that VB.net is the only mainstream language that do not use
that words for the conpcets they represent.

Well, take inheritance of another sample. VB uses 'Inherits', Java and J#
use 'extends' and C# uses ' : '. Which one is the best? Did anybody count
the number of occurances of each of the terms in OOP books? I think the
primary goal is consistency inside of each programming language's syntax
followed from choosing appropriate self-explaining terms instead of using
stupid and sub-optimal terms which have been carried forward for
compatibility reasons for decades.
 
C

Cor Ligthert [MVP]

Isgnacio,

You are consequently talking about other languages. What languages do you
mean. The set of languages you are in my opinion talking about is really
small and is hug only because it exist in so many different tastes.

See this schema where they for this languages had to stretch the schema.

http://www.levenez.com/lang/history.html#01

The languages you referring too can not tip to the consistent language as
Basic (and more). However have some legacy behaviour (needed for backward
compatibility in what is written about it). What should not mean in my
opinion that a new language should inherit that legacy in the same way as a
new root in that family should not avoid to keep using that legacy/backward
cmpatibility..

If it was as you write, than English speaking people would still eat *flesh*
instead of *meat*.

Cor
 
C

Cor Ligthert [MVP]

Jon and Terry,
Where did anyone complain about the choice of character? As I read it,
the complaint was that it was necessary to use anything at all to
signify a continuation onto the next line, not the particular character
chosen to represent it.
Sorry, I have read this
*one you have to use the pesky _ at the end*

My English is of course not as good as you Brittains, however I think that I
understood very well what is written.

By the way, in this do you or to use a *contiunation* character or an *end*
character, which natural would be the hyphen and the dot. I think that it is
not needed to explain for you that both don't really fit.

Cor
 
J

Jon Skeet [C# MVP]

Cor Ligthert said:
Jon and Terry,
Sorry, I have read this
*one you have to use the pesky _ at the end*

My English is of course not as good as you Brittains, however I think that I
understood very well what is written.

Sorry, but I think you've misunderstood. If someone were to write
(about C#) "I can't stand all those pesky semi-colons at the end of
statements" I would understand them to mean that they would prefer to
not have to use any statement termination symbol at all, not that
they'd prefer a different character.
By the way, in this do you or to use a *contiunation* character or an *end*
character, which natural would be the hyphen and the dot. I think that it is
not needed to explain for you that both don't really fit.

Now it's my turn to not understand. I've no idea whether you've just
asked me to do something or not, or what it is if you *are* asking me
to do something.
 
J

Jon Skeet [C# MVP]

Cor Ligthert said:
No I do not, you probably forgot the text I wrote (see below).

Which part are you arguing with? It seems fairly clear to me - you've
criticised C#'s choice of keywords, and said at the same time that no-
one with a preference for C# should criticise VB.NET's choice of
keywords.
By the way, I
don't find C# a bad program language, I don't know where you got that idea.

I never claimed you did find C# a bad program language.
I find at least for UI type programs VBNet better, which text means direct
that there are in my opinion things that can better be done with C# or any
other C language.

That's a logical fallacy. I could make up a language (call it BadJon,
for instance) which is terrible at *everything*. By your logic, saying
that VB.NET is better than BadJon for UI programs implies that BadJon
is better than VB.NET at other things. There's just no such
implication.
For you is legacy maybe a bad word, for me it is affected with backward
compatibility. Maybe should I have used that. However I could not resist :)

I have no problem with the word "legacy". What I *do* have an objection
to is the idea that the validity of a criticism of any language is
dependent on the person making that criticism. How can that possibly be
so? If we were to write exactly the same sentence about a particular
VB.NET keyword, why would it be any more true when you wrote it than
when I wrote it?

While we're talking about "static" however, consider this: VB.NET
itself uses the keyword "Static", and it neither means the same as C#'s
static, nor does it mean that it has "non-changeable content". It means
the same as static does in C *for a local variable*.
 
A

_AnonCoward

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>
: wrote in message : H,
:
:
: The only thing I do not understand why is still in place is that VB.net
: demand than the entire sentence be written in one line, if you want to
: split it in more than one you have to use the pesky _ at the end, I
: can't understand why that has been dragged all along.


I look at it this way. I rarely need to wrap code across multiple lines -
most of the code I write is single line statements or block statements. In
VB, I don't have to concern myself with making sure to mark the end of every
line of code when I'm finished with it as I do in C#. I simply press the
enter key (which I am also obligated to do in C# as well anyway) and move to
the next line. I find the constant need for the trailing ';' characters in
C# to be a far more pesky than the occasional '_' character in VB. Besides,
if VB were to do away with the new-line character as the terminator, then
they'd have to replace it with a variation of the C ";" approach. What would
be the point of that?


Of course, when I actually do get into a C# or Java project, I stop noticing
the fact that I'm constantly pressing the ";" key and just do it. It becomes
second nature almost immediately. So too in VB - about the only time I
routinely wrap lines is in multi-parameter function statements and the
occasional string concatenation. As with the ";" character in C#, I really
don't notice the "_" character after the first pass or so. As with most
things regarding VB vs. C#, this is simply a matter of style and has nothing
to do with the languages themselves.


: Also IMO they made weird selection for the new reserved words (
: overridable, mustinherit , etc ) instead of the set of them used in
: most other languages ( abstract , virtual, etc ) almost like if they
: wanted to looks diferent from the rest of the languages.


It seems to me that VB (and basic before it) has always been written in such
a way that it is largely self documenting. The keywords of VB.net strike me
as keeping with that trend. In VB, if you must inherit a class, it is marked
as "MustInherit". That strikes me as being much more self-evident statement
than the keyword "abstract" used in elsewhere. In this same vein, I think
declaring functions or members of a class as "Shared" is much clearer than
flagging them as "static" (implying they never change which of course they
can). The reserved keywords of VB are only weird when you are first
introduced to them.


That said, I am English speaking and so I find the language construction of
VB very natural and obvious. I recognize that someone who does not speak
English may not share in that assessment. Even so, C#, like C/C++ and Java
before it, are also based on English terminology (switch, case, for, if,
break, continue, abstract, event, private, protected, class, structure,
object, etc., etc.). Therefore, I don't think that learning VB for the non
English speaking programmer is significantly harder than learning C# on that
particular basis.


Ralf
 
M

Michael D. Ober

In C and C# you must use a semi-colon to indicate the end of a statement.
This allows statements to continue across multiple lines without a
continuation character. In VB, statements are only one line long unless
they have a continuation character. Both languages support multiple
statements on a single line - C# via adding a statement after the semi-colon
and VB by adding a colon between statements. This is a syntax issue only,
but it plays directly into readability of the language. Which one you like
depends on your preferences.

Mike Ober.
 
H

Homer J Simpson

I would like to ask you this question. I am experienced in programming
in VBA and I want to upgrade my knowledge to Visual Studio 2005 now. I
hesitate whether to aim to VB or C#.

Supposedly C# programmers earn more $$$ than VB programmers.
Since I am familiar with VBA I
would like to choose VB but I heart from my colleagues that VB is a
"dead" language

Nope. Bill G still likes Basic. It is also much better at self documenting
than any other language.
 
J

Jon Skeet [C# MVP]

Michael D. Ober said:
In C and C# you must use a semi-colon to indicate the end of a statement.
This allows statements to continue across multiple lines without a
continuation character. In VB, statements are only one line long unless
they have a continuation character. Both languages support multiple
statements on a single line - C# via adding a statement after the semi-colon
and VB by adding a colon between statements. This is a syntax issue only,
but it plays directly into readability of the language. Which one you like
depends on your preferences.

Absolutely. There are definitely swings and roundabouts. As an
anonymous poster wrote, there are far more lines *without*
continuations than ones *with* - but then again, not being quite as
white-space sensitive makes it easier to cut and paste code in C#, and
encourages lines to be wrapped more often. (i.e. in VB.NET there's more
of a temptation to try to get a statement onto one line so as to avoid
the continuation character. Not much more, but a little bit...)
 
J

Jon Skeet [C# MVP]

Homer J Simpson said:
Nope. Bill G still likes Basic. It is also much better at self documenting
than any other language.

I've heard that said before, but never been given any evidence for it.
Of course, in VS.NET 2003, if you're using VB.NET you can't produce XML
documentation without extra plug-ins, so your code had *better* be
self-documenting... (I'm not sure why it was missed out of VB.NET to
start with - I'm very glad it's finally here in VS 2005.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top