Why program in C#?

H

Herfried K. Wagner [MVP]

Dennis said:
As I understand it, with VB.net 2005, you will have generics and multiple
inheritance in VB.

There won't be support for multiple inheritance in VB 2005 and VC# 2005.
Are there any other advantages of C++ left to include in
VB.Net other than compiling of standalone programs?

Compiling "standalone programs" is only an advantage as long as the .NET
Framework is not installed on most users' computers. MI has its advantages
but also introduces disadvantages.
 
M

M. Posseth

Are you just calling DLLs written in one language or the other?

Yes but with a slight twist

in my solution i just add a new project wich might be another .Net language
i set a reference and set the build order now whenever i compile a new Dll
is placed
in the other project`s Bin directory

the hole project is still Xcopy deployable ( you do not have to worry about
registrations etc etc )
 
M

M. Posseth

It would be great to post it as a comment back to the codeproject website
wher the original article is published ( ofcourse then in English )

so if you have some spare time :)


Herfried K. Wagner said:
M. Posseth said:
I just read an article on the codeproject website

see this :
http://www.codeproject.com/useritems/CSharpVersusVB.asp

[For those who understand German:]

I commented on the (technical) points raised in the article in German some
days ago:

<URL:http://groups.google.de/[email protected]
..gbl>

My resume: Most of the points are invalid and/or do not apply.
 
H

Herfried K. Wagner [MVP]

M. Posseth said:
It would be great to post it as a comment back to the codeproject website
wher the original article is published ( ofcourse then in English )

so if you have some spare time :)

At the moment I don't have much spare time :-/.
 
M

M. Posseth

Yes

and the nice thingy is that you can set the build order`s etc etc and it all
compiles in one run
and copies the dll`s to the right place ( if you set the depends options )
 
H

Herfried K. Wagner [MVP]

Brett said:
I see. So you might start a VB.NET solution and then just add a C# project
to it?

Solutions can contain projects in different programming languages, there are
no programming language-specific solutions. To answer your question: Yes,
you can simply add a VS.NET project written in another programming language
to your solution.
 
M

Michael C#

M. Posseth said:
This is Cool

I just read an article on the codeproject website

see this :
http://www.codeproject.com/useritems/CSharpVersusVB.asp

The article is one person's opinion. The key word here is "opinion".
C#.NET and VB.NET are to me, for the most part, just different ways to
access similar functionality.
And I guess that the thoughts I always had about C++ , JAVA and DELPHI
programmers is really true They are frustrated !!!

They can`t stand it that there is a programming language ( VB ) that is
as
powerful (in the right perception even more powerful ) as they're
language
and that is so easy to learn .

As far as C++, Java, Delphi, etc., they all have their place; C++ is
available in managed form as well, so I doubt C++ programmers are losing
much sleep. AFAIK, Borland is either working on - or has already released -
a .NET version of Delphi. So the frustration level is probably not peaking
their either, since Delphi programmers have - or will have - the option of
programming for .NET using their preferred tool. And Java developer
frustration? Sounds more like you're channeling MS's entire marketing
department than speaking any actual facts. I haven't seen any statistics
showing "Java developer" frustration with .NET - although I have seen Java
and .NET developers going at each other's throats; usually about silly
hypertechnical crap that most of us couldn't care less about anyway.
1. if you want to code in a fraction of the time to accomplish the same
thing

This doesn't always apply. I find the syntax for C# Delegates to be more
intuitive and easier to use than the VB.NET version. It all depends on what
you're trying to do and what you feel comfortable with. I can program a
multithreaded app that takes advantage of asynchronous delegates in C# in
about 1/2 the time it takes me in VB.NET. Does all this mean C# is easier
than VB? Or does it just mean that I'm more comfortable with C#'s syntax in
this particular situation?
C# uses actual academic OO terms as keywords while VB uses the
"friendly"
normal english definition as keywords

As far as C#'s "academic OO terms"; C#'s syntax is deeply rooted in C-style
syntax, which is known for valuing compactness and efficiency over
readability. C#'s keywords are no more "academic" than any other language;
they just provide a different way to say the same thing. As you point out,
English is no more Academic or educated than Dutch, or any other language.

A lot of the "high-falutin'" feeling of superiority surrounding C-style
keywords is probably propagated by developers who use C-style languages more
than from any other source. "To-MAH-to" is no more 'academic' than
"To-MA-to"; it just makes some people feel better about themselves to claim
they say the former, and never the latter.
VB is much easier to learn...

This depends on your background. Coming from a C/C++ background, C# was
easier for me to learn; and I later picked up on VB.
 
C

Cor Ligthert

Terry,
In my experience, most .NET developers 'Think' in either C# or VB.NET,
switching between the two usually means you stumble on the syntax. Its a
bit like switching between Spanish and English, if English is your native
language and you speak it most of the time, this is the one you will have
least errors in.
removed a part less important for my answer.
From a translation point of view, I usually code in VB first and then
translate it to C#

We don't agree. First your languages.

I can easily read Dutch, English and German

I can read French, however have a lot to guess, and need a dictionary for
real reading

I can speak easily Dutch and less easily English, however not that I have
any problem with it. As a side step, in past I had once late at night an
argument in English, with a porter in a London club. As a real Dutch I did
not want to pay the complete membership to enter. At a certain moment, he
was asking if I did not understand my mothers tongue. However, it is not
anymore like that. I assume that you can see for your eyes how it was,
before you misunderstand it, I was probably (that good I don't remember it
me anymore) at least a head taller than him and had probably arms twice as
thick.

I can communicate (speaking) very easily in the German language with German
people. I can communicate (speaking) easily (comparing with others) with
French and Polish people in their language. I could communicate in their
language with Italian people.

To explain something not necessary for this message, however otherwise you
get maybe a wrong idea, because you have read a lot from me. I have a brain
that works a little bit else than from most other people with writing.
Therefore, when I write serious I have to pay more attention to that. (When
it is important I mostly led it stay more hours and read it back, however
not in this newsgroup case, that is not important enough for me.)

To come back on your subject again, when I am speaking French and I have not
done it a while, than I am using Polish words. While when I am speaking
Polish, I am often using Italian words.

However in the last situations never English, German or Dutch words. Why,
that is because, when I am speaking, know the meaning of those English,
German and Dutch words.

Now back to your program languages. I never take another program language as
sample when I am writing in that. That would mean that I as well take the
bad things from those languages too the other languages and make it for
somebody, who does not know that programming language, afterwards difficult
to understand why I did it. You saw it today when somebody was asking about
how to use the "/n" in VBNet.

This would in my opinion led to a situation that there could be used the
ProperCase in C#. (What I forever remember me as the first message I saw
from you in this newsgroup) It is not a problem. However, bad to understand
for any C# programmer, who would have later to do maintenance on the
program.

By the way, when I write/speak English I think English, when I speak German,
I think German (not in the way as the stereotype German, before you
misunderstand). When I speak Polish (and especially when I have drunk a lot
of Vodka) I think Polish.

I thought let me write once a longer message.

Cor
 
D

David

What is the reason to do a project in C# rather than VB.NET and vice versa?
Please exclude any differences in syntax and C/C++ background. Consider if
you know VB and C/C++, why go one way or the other with the .NET languages?

Basically, the languages appear to be the same. What can't I do in C# that
I can in VB.NET and vice versa...on the project level.


The languages are pretty similar, and I can only think of two situations
where language differences might make me lean one way or the other on a
project.

If you're coding to late-bound com objects, or trying to control Office
or something like that, VB.Net can make life much easier since it has a
late-bound mode.

If you're writing large controls or components, C#'s event properties
are very useful when it comes to optimization.

Other than that, I find the languages themselves to be pretty similar,
although as you've found you can get lots of flame wars over which
syntax is easier to use, which is more robust, etc. IMHO, the biggest
difference isn't the languages themselves, but there's still some big
differences that you should be aware of if you're starting a project.

Code generation tools tend to target C# first, and then only sometimes
expand to include VB.Net. So if you need parser generators, OR mapping,
stuff like that, you'll find a lot more options available for C# than
for VB.

That's true for code editing tools as well, there's a lot more
third-party plugins and scripts available to do things like refactoring
in C# than VB.Net.

The VB.Net IDE does background compilation, which provides instant
feedback on syntax errors (someone in another post said that this causes
performance problems on very large projects, though, but I haven't seen
that).

The VB.Net compiler is very forgiving, which is another way of saying
that its lint capabilities really suck. This gets you very much into
style, some people like the forgiving style, some people don't (as an
aside, this is the thing I dislike most about VB.net, I wish it had a
"strict" flag for the compiler; and no, that's not nearly the same thing
as Option Strict).

The VB.Net IDE doesn't support code comments in intellisense, which can
really be useful in multi-person projects.

Looking at language capabilities isn't going to help you much, because
the two have very similar capabilities. Coding style between the two is
very different, though. You asked for folks not to comment on the
programmer's background, but frankly, that probably should be the
overriding concern.
 
B

Brett

David said:
The languages are pretty similar, and I can only think of two situations
where language differences might make me lean one way or the other on a
project.

If you're coding to late-bound com objects, or trying to control Office
or something like that, VB.Net can make life much easier since it has a
late-bound mode.

If you're writing large controls or components, C#'s event properties
are very useful when it comes to optimization.

Other than that, I find the languages themselves to be pretty similar,
although as you've found you can get lots of flame wars over which
syntax is easier to use, which is more robust, etc. IMHO, the biggest
difference isn't the languages themselves, but there's still some big
differences that you should be aware of if you're starting a project.

Code generation tools tend to target C# first, and then only sometimes
expand to include VB.Net. So if you need parser generators, OR mapping,
stuff like that, you'll find a lot more options available for C# than
for VB.

When you say parser, would that be use of regular expressions and parsing
complicated strings (URLs) out of large complicated documents (HTML pages)?

What exactly do you mean by mappings?
That's true for code editing tools as well, there's a lot more
third-party plugins and scripts available to do things like refactoring
in C# than VB.Net.

The VB.Net IDE does background compilation, which provides instant
feedback on syntax errors (someone in another post said that this causes
performance problems on very large projects, though, but I haven't seen
that).

The VB.Net compiler is very forgiving, which is another way of saying
that its lint capabilities really suck. This gets you very much into
style, some people like the forgiving style, some people don't (as an
aside, this is the thing I dislike most about VB.net, I wish it had a
"strict" flag for the compiler; and no, that's not nearly the same thing
as Option Strict).

Can you provide an example of what you mean here. In the paragraph before
this, you say the compiler provides instant feedback on syntax errors, which
I'd think means it is less forgiving. But then you say it is very
forgiving. My lack of understanding on what you mean there is mixing me up.
The VB.Net IDE doesn't support code comments in intellisense, which can
really be useful in multi-person projects.

Looking at language capabilities isn't going to help you much, because
the two have very similar capabilities. Coding style between the two is
very different, though. You asked for folks not to comment on the
programmer's background, but frankly, that probably should be the
overriding concern.

Than you get a lot of bias, which I'm not looking for.
 
D

David

When you say parser, would that be use of regular expressions and parsing
complicated strings (URLs) out of large complicated documents (HTML pages)?

Parser generators, things like yacc and bison. One use would be to
parse strings out of complicated documents, but HTML is a special case
since there's already so many things that do that.
What exactly do you mean by mappings?

OR (Object Relational) mapping. When I look back at my post, I realize
the comma was a bit ambiguous.

Can you provide an example of what you mean here. In the paragraph before
this, you say the compiler provides instant feedback on syntax errors, which
I'd think means it is less forgiving. But then you say it is very
forgiving. My lack of understanding on what you mean there is mixing me up.

The vb.net IDE does constant background compiling, so you get instant
feedback on a lot of errors, especially simple syntax errors like typing
a variable name wrong.

OTOH, when it actually comes time to compile for real, C# will warn you
about a lot of errors that the VB.Net compiler will ignore. Basic
things like unused variables or not returning a value from a function
are ignored by the VB.Net compiler.
 

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