473,387 Members | 3,820 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,387 software developers and data experts.

C# is Better Than VB ?

Hello!!!
I have heard that C# is better than VB because of optimization and standard
of Microsoft .NET development?
Nov 17 '05 #1
11 1265


"Daniyal" wrote:
Hello!!!
I have heard that C# is better than VB because of optimization and standard
of Microsoft .NET development?


That depends on which VB you mean. It's better than VB6 for the reasons
you've listed, but VB.NET uses the identical framework and compilation
routines which makes the two equivilant. Langauge differences make some
constructs more natural to do in each langauge. The same is true of any
other language using the CLR.
Nov 17 '05 #2
Strange as it may seem, especially as I am a big C# user that really can't
stand VB on moral grounds ;-)... There are some instances where the VB
compiler generates neater and demonstrably faster code than the exact
equivalent C# code.

However, I only say this as a demonstration of my impartiality.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Daniyal" <Da*****@discussions.microsoft.com> wrote in message
news:03**********************************@microsof t.com...
Hello!!!
I have heard that C# is better than VB because of optimization and
standard
of Microsoft .NET development?

Nov 17 '05 #3
Bob Powell [MVP] <bob@_spamkiller_bobpowell.net> wrote:
Strange as it may seem, especially as I am a big C# user that really can't
stand VB on moral grounds ;-)... There are some instances where the VB
compiler generates neater and demonstrably faster code than the exact
equivalent C# code.


Interesting - do you have any examples? I've seen the exact reverse,
where the VB.NET compiler generates fewer IL instructions, but bigger
ones, such that the size of a method in bytes is bigger for VB.NET than
for C#. In cases like that, it's possible for the size to go over the
inlined/not-inlined boundary and make the C# code faster. The chances
of that being significant are absolutely miniscule, of course - but I
hadn't heard about the reverse situation.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 17 '05 #4
Well, when all is said and done we might all consider that Vista has been
developed using C#.
There must be at least some valid reasons for that choice so let's see,
could it be because VB.NET has also been developed using C#? Hello?

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
"Daniyal" <Da*****@discussions.microsoft.com> wrote in message
news:03**********************************@microsof t.com...
Hello!!!
I have heard that C# is better than VB because of optimization and
standard
of Microsoft .NET development?

Nov 17 '05 #5
Hmm... , VISTA the OS, is unmanaged C++ and some assembly code only(still
under development). Guess you are talking about something like Avalon and
Indigo.

Willy.

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Well, when all is said and done we might all consider that Vista has been
developed using C#.
There must be at least some valid reasons for that choice so let's see,
could it be because VB.NET has also been developed using C#? Hello?

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
"Daniyal" <Da*****@discussions.microsoft.com> wrote in message
news:03**********************************@microsof t.com...
Hello!!!
I have heard that C# is better than VB because of optimization and
standard
of Microsoft .NET development?


Nov 17 '05 #6
As an interesting side note, MSR created a research OS (Singularity) using
managed C# to see if they could do it and experiment with ideas. I guess
the perf is much better then they expected. Interesting piece of work.
http://geekswithblogs.net/umesh/arch.../21/40165.aspx

--
William Stacey [MVP]

"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:OQ**************@TK2MSFTNGP14.phx.gbl...
Hmm... , VISTA the OS, is unmanaged C++ and some assembly code only(still
under development). Guess you are talking about something like Avalon and
Indigo.

Willy.

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Well, when all is said and done we might all consider that Vista has been
developed using C#.
There must be at least some valid reasons for that choice so let's see,
could it be because VB.NET has also been developed using C#? Hello?

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
"Daniyal" <Da*****@discussions.microsoft.com> wrote in message
news:03**********************************@microsof t.com...
Hello!!!
I have heard that C# is better than VB because of optimization and
standard
of Microsoft .NET development?



Nov 17 '05 #7
That's not what a Microsoft VP was quoted as stating in one of this week's
trade journals (eWeek or Information World as I recall). I think it was the
VP they call Soma who controls the developers group and they were discussing
the reorganization. It was stated that Vista has been developed from the
ground up using C# with a marginal use of unmanaged code in the kernel.

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/


"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:OQ**************@TK2MSFTNGP14.phx.gbl...
Hmm... , VISTA the OS, is unmanaged C++ and some assembly code only(still
under development). Guess you are talking about something like Avalon and
Indigo.

Willy.

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Well, when all is said and done we might all consider that Vista has been
developed using C#.
There must be at least some valid reasons for that choice so let's see,
could it be because VB.NET has also been developed using C#? Hello?

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
"Daniyal" <Da*****@discussions.microsoft.com> wrote in message
news:03**********************************@microsof t.com...
Hello!!!
I have heard that C# is better than VB because of optimization and
standard
of Microsoft .NET development?



Nov 17 '05 #8
My March 4th blog entry at http://bobpowelldotnet.blogspot.com explains one
concrete instance.

I think that certain for-each for-next loops are more efficient in VB.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Bob Powell [MVP] <bob@_spamkiller_bobpowell.net> wrote:
Strange as it may seem, especially as I am a big C# user that really
can't
stand VB on moral grounds ;-)... There are some instances where the VB
compiler generates neater and demonstrably faster code than the exact
equivalent C# code.


Interesting - do you have any examples? I've seen the exact reverse,
where the VB.NET compiler generates fewer IL instructions, but bigger
ones, such that the size of a method in bytes is bigger for VB.NET than
for C#. In cases like that, it's possible for the size to go over the
inlined/not-inlined boundary and make the C# code faster. The chances
of that being significant are absolutely miniscule, of course - but I
hadn't heard about the reverse situation.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too

Nov 17 '05 #9
Well, they are wrong (the trade journals ), no single MS VP would ever say
such a thing (ps. the VP of the Developer Division is Somasegar ).
All that's written in managed code (take care, I'm not saying C#, because it
would be wrong also) is Avalon and Indigo (now WPF and WCF), this added to
the upcomming v2. framework is called WinFX, but this is not the OS.
Willy.

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:Oh**************@TK2MSFTNGP11.phx.gbl...
That's not what a Microsoft VP was quoted as stating in one of this week's
trade journals (eWeek or Information World as I recall). I think it was
the VP they call Soma who controls the developers group and they were
discussing the reorganization. It was stated that Vista has been developed
from the ground up using C# with a marginal use of unmanaged code in the
kernel.

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/


"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:OQ**************@TK2MSFTNGP14.phx.gbl...
Hmm... , VISTA the OS, is unmanaged C++ and some assembly code only(still
under development). Guess you are talking about something like Avalon and
Indigo.

Willy.

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in
message news:%2****************@tk2msftngp13.phx.gbl...
Well, when all is said and done we might all consider that Vista has
been developed using C#.
There must be at least some valid reasons for that choice so let's see,
could it be because VB.NET has also been developed using C#? Hello?

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
"Daniyal" <Da*****@discussions.microsoft.com> wrote in message
news:03**********************************@microsof t.com...
Hello!!!
I have heard that C# is better than VB because of optimization and
standard
of Microsoft .NET development?



Nov 17 '05 #10
Bob Powell [MVP] <bob@_spamkiller_bobpowell.net> wrote:
My March 4th blog entry at http://bobpowelldotnet.blogspot.com explains one
concrete instance.

I think that certain for-each for-next loops are more efficient in VB.


Thanks very much - just what I was after.

(I'd be interested to see whether it would help to use x<<2 instead of
x*4, by the way.)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 17 '05 #11

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

Similar topics

220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
3
by: Muhd | last post by:
<usualDisclaimer>Please forgive me if this is in the wrong group, and if so, what is the right group.</usualDisclaimer> Let me start off by first saying im a newb. Ok, with that out of the way I...
24
by: Faith Dorell | last post by:
I really donīt like C.You can write better programs in BASIC than in C, if you donīt like this language. I donīt understand how C became so popular, although much better programming languages...
43
by: Rob R. Ainscough | last post by:
I realize I'm learning web development and there is a STEEP learning curve, but so far I've had to learn: HTML XML JavaScript ASP.NET using VB.NET ..NET Framework ADO.NET SSL
33
by: Protoman | last post by:
Which is better for general-purpose programming, C or C++? My friend says C++, but I'm not sure. Please enlighten me. Thanks!!!!!
22
by: JoeC | last post by:
I am working on another game project and it is comming along. It is an improvment over a previous version I wrote. I am trying to write better programs and often wonder how to get better at...
19
by: Alexandre Badez | last post by:
I'm just wondering, if I could write a in a "better" way this code lMandatory = lOptional = for arg in cls.dArguments: if arg is True: lMandatory.append(arg) else: lOptional.append(arg)...
23
by: mike3 | last post by:
Hi. (posted to both newsgroups since I was not sure of which would be appropriate for this question or how specific to the given language it is. If one of them is inappropriate, just don't send...
20
by: mike3 | last post by:
Hi. (Xposted to both comp.lang.c++ and comp.programming since I've got questions related to both C++ language and general programming) I've got the following C++ code. The first routine runs in...
3
by: Ryan Liu | last post by:
Hi, Is Async I/O (e.g. NetworkStream.Begin/End Read/Write) always better than synchronous I/O? At least as good? When I don't concern about easy or difficult to write code, should I always...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.