473,549 Members | 2,948 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# vs. VB.NET: typing speed

I recently switched temporarily from C# to VB.NET to see what the
differences are.

To my surprise I am *much* faster with VB.NET. I don't know why,
pressing the shift key to capitalize letters slows me down
tremendously, among having to type a semicolon after each statement,
not having intelligent auto-complete and auto-indentation and not
having the (evil, maybe) with statement ...

I also like the horizontal lines that clearly distinguish different
functions. I still think C# looks much nicer (less verbose) if you come
from Java/C++, but after you get used to VB.NET's syntax, you begin
changing your mind about that as well...

VB.NET seems to have quite a horrible history/legacy (at least when it
comes to good OO design), which is why many "oldschool" developers do
not use it.

Is there anything beyond that that makes it less useful than C#? I
mean, it is a first class language, after all, isn't it?

Are there any tools out there that convert one language to the other,
project-wide, so that if a customer wants a C# solution, I can still
use it and convert it at the very last moment?

Sep 11 '06 #1
16 1697
GS
converter are not perfect. there are a few free ones. some app requires
substantial manual tweak, so much that productivity gain gets lost. Maybe
that is just my experience.

As for case senility one could get over that with some macro, scanners or
fancy editors

Btw, in vibe, you get a form type application working well, then you add a
few lines of codes and the newly compiled code will not load with something
about unhandled exception and leave you wondering which statement you
neglected to put in try ... catch end try.
there are some apps or part of some apps that are more suited with c

<by*********@go oglemail.comwro te in message
news:11******** **************@ d34g2000cwd.goo glegroups.com.. .
I recently switched temporarily from C# to VB.NET to see what the
differences are.

To my surprise I am *much* faster with VB.NET. I don't know why,
pressing the shift key to capitalize letters slows me down
tremendously, among having to type a semicolon after each statement,
not having intelligent auto-complete and auto-indentation and not
having the (evil, maybe) with statement ...

I also like the horizontal lines that clearly distinguish different
functions. I still think C# looks much nicer (less verbose) if you come
from Java/C++, but after you get used to VB.NET's syntax, you begin
changing your mind about that as well...

VB.NET seems to have quite a horrible history/legacy (at least when it
comes to good OO design), which is why many "oldschool" developers do
not use it.

Is there anything beyond that that makes it less useful than C#? I
mean, it is a first class language, after all, isn't it?

Are there any tools out there that convert one language to the other,
project-wide, so that if a customer wants a C# solution, I can still
use it and convert it at the very last moment?

Sep 11 '06 #2
Byteschreck,

That is the main reason I like VB.Net more than C#, for the rest there are
almost no differences.

It is not only typing speed, it are as well optimized code as

Dataset ds = new Dataset();
in VB.Net
dim ds as New Dataset

I wished that crazy dim was not needed (optinal) than it would be even more
typing speed.

(Another thing is that you can without problems nest much deeper than in C#,
something you would as well not believe on first sight)

Cor

<by*********@go oglemail.comsch reef in bericht
news:11******** **************@ d34g2000cwd.goo glegroups.com.. .
>I recently switched temporarily from C# to VB.NET to see what the
differences are.

To my surprise I am *much* faster with VB.NET. I don't know why,
pressing the shift key to capitalize letters slows me down
tremendously, among having to type a semicolon after each statement,
not having intelligent auto-complete and auto-indentation and not
having the (evil, maybe) with statement ...

I also like the horizontal lines that clearly distinguish different
functions. I still think C# looks much nicer (less verbose) if you come
from Java/C++, but after you get used to VB.NET's syntax, you begin
changing your mind about that as well...

VB.NET seems to have quite a horrible history/legacy (at least when it
comes to good OO design), which is why many "oldschool" developers do
not use it.

Is there anything beyond that that makes it less useful than C#? I
mean, it is a first class language, after all, isn't it?

Are there any tools out there that convert one language to the other,
project-wide, so that if a customer wants a C# solution, I can still
use it and convert it at the very last moment?

Sep 11 '06 #3
Sept. 10, 2006

I can go millions of lines faster with VB... I'm just not good at
remembering casing, either. :-)

As far as the code convertor - I believe I saw one on MSDN as a sample for
VS 05..... try searching MSDN.

And nope, I don't think there are really any issues which make VB less
useful than C#.
--

Joseph Bittman
Microsoft Certified Solution Developer
Microsoft Most Valuable Professional -- DPM

Blog/Web Site: http://CactiDevelopers.ResDev.Net/
<by*********@go oglemail.comwro te in message
news:11******** **************@ d34g2000cwd.goo glegroups.com.. .
>I recently switched temporarily from C# to VB.NET to see what the
differences are.

To my surprise I am *much* faster with VB.NET. I don't know why,
pressing the shift key to capitalize letters slows me down
tremendously, among having to type a semicolon after each statement,
not having intelligent auto-complete and auto-indentation and not
having the (evil, maybe) with statement ...

I also like the horizontal lines that clearly distinguish different
functions. I still think C# looks much nicer (less verbose) if you come
from Java/C++, but after you get used to VB.NET's syntax, you begin
changing your mind about that as well...

VB.NET seems to have quite a horrible history/legacy (at least when it
comes to good OO design), which is why many "oldschool" developers do
not use it.

Is there anything beyond that that makes it less useful than C#? I
mean, it is a first class language, after all, isn't it?

Are there any tools out there that convert one language to the other,
project-wide, so that if a customer wants a C# solution, I can still
use it and convert it at the very last moment?
Sep 11 '06 #4
The background compilation feature of VB.NET 2005 are sorely needed in C#.
In C#, you have to do another build after correcting the previous build's
compile errors. The VB compiler silently does this for you and you can
actually watch your error count go down. The tradeoff here is that the VB
compiler requires a boatload of memory.

The only native feature C# has that VB doesn't is the "yield" statement for
early returning out of enumerations. Fortunately, VB can mimic this by
returning the entire collection, but this has the trade off of requiring the
entire result set be computed before the first return.

VB explicitly tags event handlers with the "handles" clause. You don't have
to go into the form designer to verify which event handlers go with which
events. Also, since VB has a "(Declarations) " section for each module that
lists all procedures that don't have associated controls, it's real easy to
find, without compiling, orphaned event handlers.

VB 2005 is still missing one thing that made the VB 6 editor even better.
This is the ability to limit the editor scope to just the procedure you're
looking at, which prevents you from accidentally scrolling past the top or
bottom of the procedure you're interested in. Also, E&C isn't as well done
in VB 2005 as VB 6.

As for multi-language development, MS has done an outstanding job. I am
currently working on a web-site that has assemblies in both VB 2005 and C#
2005 and the debugger doesn't even miss a beat when switching assemblies or
displaying objects that are declared in one language and then used in the
other.

Mike Ober.
"Cor Ligthert [MVP]" <no************ @planet.nlwrote in message
news:OT******** ******@TK2MSFTN GP03.phx.gbl...
Byteschreck,

That is the main reason I like VB.Net more than C#, for the rest there are
almost no differences.

It is not only typing speed, it are as well optimized code as

Dataset ds = new Dataset();
in VB.Net
dim ds as New Dataset

I wished that crazy dim was not needed (optinal) than it would be even
more typing speed.

(Another thing is that you can without problems nest much deeper than in
C#, something you would as well not believe on first sight)

Cor

<by*********@go oglemail.comsch reef in bericht
news:11******** **************@ d34g2000cwd.goo glegroups.com.. .
>>I recently switched temporarily from C# to VB.NET to see what the
differences are.

To my surprise I am *much* faster with VB.NET. I don't know why,
pressing the shift key to capitalize letters slows me down
tremendously , among having to type a semicolon after each statement,
not having intelligent auto-complete and auto-indentation and not
having the (evil, maybe) with statement ...

I also like the horizontal lines that clearly distinguish different
functions. I still think C# looks much nicer (less verbose) if you come
from Java/C++, but after you get used to VB.NET's syntax, you begin
changing your mind about that as well...

VB.NET seems to have quite a horrible history/legacy (at least when it
comes to good OO design), which is why many "oldschool" developers do
not use it.

Is there anything beyond that that makes it less useful than C#? I
mean, it is a first class language, after all, isn't it?

Are there any tools out there that convert one language to the other,
project-wide, so that if a customer wants a C# solution, I can still
use it and convert it at the very last moment?


Sep 11 '06 #5
VB.NET is missing anonymous methods and closures. It is an incredibly
useful feature.

Brian

by*********@goo glemail.com wrote:
I recently switched temporarily from C# to VB.NET to see what the
differences are.

To my surprise I am *much* faster with VB.NET. I don't know why,
pressing the shift key to capitalize letters slows me down
tremendously, among having to type a semicolon after each statement,
not having intelligent auto-complete and auto-indentation and not
having the (evil, maybe) with statement ...

I also like the horizontal lines that clearly distinguish different
functions. I still think C# looks much nicer (less verbose) if you come
from Java/C++, but after you get used to VB.NET's syntax, you begin
changing your mind about that as well...

VB.NET seems to have quite a horrible history/legacy (at least when it
comes to good OO design), which is why many "oldschool" developers do
not use it.

Is there anything beyond that that makes it less useful than C#? I
mean, it is a first class language, after all, isn't it?

Are there any tools out there that convert one language to the other,
project-wide, so that if a customer wants a C# solution, I can still
use it and convert it at the very last moment?
Sep 11 '06 #6
<by*********@go oglemail.comsch rieb:
Is there anything beyond that that makes it [VB.NET] less useful than C#?
I
mean, it is a first class language, after all, isn't it?
Not really. There are some differences in the feature set, but basically it
should not matter which one of the two languages you are using.
Are there any tools out there that convert one language to the other,
project-wide, so that if a customer wants a C# solution, I can still
use it and convert it at the very last moment?
Yes and no. If you are using VB's 'My' feature, for example, you cannot
easily convert the code.

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

Sep 11 '06 #7
"Brian Gideon" <br*********@ya hoo.comschrieb:
VB.NET is missing anonymous methods and closures. It is an incredibly
useful feature.
Anonymous methods are useful in some rare cases, but in most cases they
drastically reduce maintainability and structuredness of the code.

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

Sep 11 '06 #8
Herfried K. Wagner [MVP] wrote:
"Brian Gideon" <br*********@ya hoo.comschrieb:
VB.NET is missing anonymous methods and closures. It is an incredibly
useful feature.

Anonymous methods are useful in some rare cases, but in most cases they
drastically reduce maintainability and structuredness of the code.
Yep, it can be abused, but so can a lot of other things we take for
granted. In this particular case I don't think it's rare enough to
exlude the feature. Consider those scenarios where you've created a
delegate that only ever has one target. The expressiveness of that
situation when using an anonymous method is unambiguous and
communicates that idea well to other developers maintaining the code.
Also consider those scenarios where you have to create a whole new
class just to capture parameters that need to be injected into the
target of a delegate. Why not use the even more useful feature of
closures for that? And then when you put them both together you get
the ability to define dynamic predicate logic inline where it's
actually used. For example,

public static void Main()
{
int divisibleBy = GetRandomDiviso r();
List<intlist = GetRandomInt32L ist();
List<intresult = list.FindAll(de legate(int x)
{
return x % divisibleBy == 0;
});
foreach (int i in result)
{
Console.WriteLi ne(i);
}
}

I think that's a pretty common scenario. Without both anonymous
methods and closures that gets a bit more tricky, less expressive, and
less elegant IMO.

Brian

Sep 11 '06 #9
"Brian Gideon" <br*********@ya hoo.comschrieb:
VB.NET is missing anonymous methods and closures. It is an incredibly
useful feature.

Anonymous methods are useful in some rare cases, but in most cases they
drastically reduce maintainability and structuredness of the code.

Yep, it can be abused, but so can a lot of other things we take for
granted. In this particular case I don't think it's rare enough to
exlude the feature. Consider those scenarios where you've created a
delegate that only ever has one target. The expressiveness of that
situation when using an anonymous method is unambiguous and
communicates that idea well to other developers maintaining the code.
Also consider those scenarios where you have to create a whole new
class just to capture parameters that need to be injected into the
target of a delegate. Why not use the even more useful feature of
closures for that? And then when you put them both together you get
the ability to define dynamic predicate logic inline where it's
actually used. For example,

public static void Main()
{
int divisibleBy = GetRandomDiviso r();
List<intlist = GetRandomInt32L ist();
List<intresult = list.FindAll(de legate(int x)
{
return x % divisibleBy == 0;
});
foreach (int i in result)
{
Console.WriteLi ne(i);
}
}

I think that's a pretty common scenario. Without both anonymous
methods and closures that gets a bit more tricky, less expressive, and
less elegant IMO.
I think you are referring to the solution below. At least to me it does not
pose such a big problem to use this solution.

\\\
Public Module Program
Public Sub Main()
Dim Divisor As Integer = 2
Dim list As New List(Of Integer)
list.AddRange(N ew Integer() {1, 2, 3, 4, 5, 6, 7, 8, 9, 10})
Dim result As List(Of Integer) = _
list.FindAll(Ad dressOf (New IsDivisibleByMa tcher(Divisor)) .Eval)
For Each i As Integer In result
Debug.WriteLine (i)
Next i
End Sub

Private Class IsDivisibleByMa tcher
Private m_Divisor As Integer

Public Sub New(ByVal Divisor As Integer)
m_Divisor = Divisor
End Sub

Public Function Eval(ByVal x As Integer) As Boolean
Return (x Mod m_Divisor) = 0
End Function
End Class
End Module
///

Even shorter:

\\\
Private Sub Main()
m_Divisor = 2
Dim list As New List(Of Integer)
list.AddRange(N ew Integer() {1, 2, 3, 4, 5, 6, 7, 8, 9, 10})
Dim result As List(Of Integer) = _
list.FindAll(Ad dressOf IsDivisibleBy)
For Each i As Integer In result
Debug.WriteLine (i)
Next i
End Sub

Private m_Divisor As Integer

Private Function IsDivisibleBy(B yVal x As Integer) As Boolean
Return (x Mod m_Divisor) = 0
End Function
///

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

Sep 11 '06 #10

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

Similar topics

49
3053
by: bearophileHUGS | last post by:
Adding Optional Static Typing to Python looks like a quite complex thing, but useful too: http://www.artima.com/weblogs/viewpost.jsp?thread=85551 I have just a couple of notes: Boo (http://boo.codehaus.org/) is a different language, but I like its "as" instead of ":" and "->", to have: def min(a as iterable(T)) as T: Instead of:
8
2393
by: andrew.queisser | last post by:
Yesterday I typed in some C++ code that called a function with two ints. Intellisense (auto-complete) helpfully told me that the first formal parameter was called "frontLight" and the second "ringLight". It occurred to me that I'm getting some semantic help here on top of the obvious type safety. It seems to me that the existance of this kind...
29
1995
by: noid droid | last post by:
Hi. I've not used C# yet but just ran across a premonition from 2 years ago saying that C# would render C++ obsolete by this time. Has it? Have most corporate developers migrated to C#? Is C++ used for new development or just legacy apps? What about non corporate developers? Microsoft really likes to hype the hell out of their stuff...
2
3502
by: zheenma | last post by:
There is a program that speed up your typing and avoid spelling errors. My friends use it ,their averege is more than 100 wpm. You can download it from www.wamasoft.com. And It has a library for c++. I hope that it can help you!
132
4740
by: Kevin Spencer | last post by:
About 2 years ago, and as recently as perhaps 1 year ago, I can recall seeing many posts about what language to use with ASP.Net. The consensus was that employers paid more for C# programmers, and it seems that C# became the darling of the ASP.Net crowd. In the meantime, I have observed an interesting phenomenon. Originally, employers hired...
23
2523
by: Luc Vaillant | last post by:
I need to initialise a typed parameter depending of its type in a generic class. I have tried to use the C++ template form as follow, but it doesn't work. It seems to be a limitation of generics vs C++ templates. Does anyone knows a workaround to do this ? Thx : public class C<T> { private T myValue;
5
2664
by: Lyle Fairfield | last post by:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callnetfrcom.asp The Joy of Interoperability Sometimes a revolution in programming forces you to abandon all that's come before. To take an extreme example, suppose you have been writing Visual Basic applications for years now. If you're like many developers,...
0
3645
by: shamirza | last post by:
· When was .NET announced? Bill Gates delivered a keynote at Forum 2000, held June 22, 2000, outlining the .NET 'vision'. The July 2000 PDC had a number of sessions on .NET technology, and delegates were given CDs containing a pre-release version of the .NET framework/SDK and Visual Studio.NET. · When was the first version of .NET released?...
2
2066
by: tavspamnofwd | last post by:
Referred here from the tutor list. ---------- Forwarded message ---------- From: Evert Rol Hi Tom, Ok, I wasn't on the list last year, but I was a few days ago, so persistence pays off; partly, as I don't have a full answer.
0
7446
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7956
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7809
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6041
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5088
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3480
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1936
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1058
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
763
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.