November 13, 2009 at 3:13 am
For me C# is easier because I was in C++/Java development, but as Flo said there is no functional difference between C# and VB.NET.
-------------------------------------------------------------
"It takes 15 minutes to learn the game and a lifetime to master"
"Share your knowledge. It's a way to achieve immortality."
November 13, 2009 at 3:23 am
Being a .NET dev for 5 years, at last, something I can talk about!
Anyway, are we talking about the language or the development environment?
If it's the former, I'm surprised no-one's pointed out both languages compile to the same intermediate language, so it'll depend on whether you prefer semi-colons and curly braces, or underscores and full english words. Just to complicate things, in the IDE there's such a thing as auto-completed, so you don't even need to write the full words out anyway.
If it's the latter, then there's not much of a difference either. Back in the .NET 1 days, I preferred C# because it was the only language that supported XML comments/documentation - but even that's now gone.
November 13, 2009 at 3:24 am
I think VB.NET is seen as the easiest migration route from VB6, fair enough.
However the primary thing you are attempting to do is move to an new programming paradigm and sometimes forcing developers into using a new paradigm assists with the shift in thinking as it is "less easy" to fallback to what worked before.
Using C# also means that languages like Java, c, c++ are more identifiable and less scary to approach.
C# is not as verbose and more naturally integrates newer language constructs without falling back on Kludgey syntax like AddressOf stuff.
November 13, 2009 at 3:28 am
If it's the former, I'm surprised no-one's pointed out both languages compile to the same intermediate language
Wasn't it mentioned in the original article?
November 13, 2009 at 3:28 am
Originally, the VB.NET team tried to make it have all the equivalent features of C#. In my opinion this was losing the power of the differences of use. It was a good thing that VB gained proper Object Oriented language constructs and a better error management facility (exceptions) but was in danger of becoming a C# clone with Begin...End instead to {...}.
That was up to and including .NET 2. however since then it appears the VB.NET team have really understood that VB.NET was the RAD tool of preference for Windows development.
C# gained designers from the VB world and VB.NET gained a raft of language features from C# (origins of most features can be found elsewhere but in the context of this discussion I am excluding this information).
I spent a long time working in teams comprised of C++/COM developers and VB developers. The differences in the features of the languages was celebrated and still should be in the C#/VB.NET world.
The right tool for the right job!!!
Hopefully someone thinks of me as a right tool 😉
Gaz
-- Stop your grinnin' and drop your linen...they're everywhere!!!
November 13, 2009 at 3:39 am
Everyone is right in this one...
A dozen years ago (hmm.. make that 2 dozen :)) I graduated as a C/C++ developer. Even then Basic was mocked with. But not laughed at. That's quite different. I know people writing better code in VB.net than most C# developers. But that's because they're just better developers. Writing code that tosses pointers around seems wowie! Maybe that's where the "elitism" came from. For that matter this dev was writing apps full of memory leaks 🙂 That's all gone now with .NET (garbage collector stuff etc) unless you still call unmanaged code.
Myself I went the C# way just because it was easier coming from C.
Nowadays I don't develop too much. I'm becoming a DBA (one day...). Now I'm mocked by my Oracle colleagues... 🙂 They also think of themselves as being elite. I used to be an AS/400 egineer as well. In that time I mocked Windows engineers. Seems the same "discussion" to me. In the end it's the result that counts. And with .NET its all IL in the end, being C#, VB.NET, ...
November 13, 2009 at 3:51 am
same with a few, vb5 to vb6 to vb.net. one of the greatest systems i ever made (aside from visual foxpro programs), was sql ce between handheld to sql server database over Internet (through a firewall).
i used a hellish vb version called 'embedded Visual Basic'. it was free but all my years and experience, were expended just getting out of eVB's bugs. but it worked. it worked fast, one week's data up in the server in 20 seconds from a dialup connection. the system ran up to 3 years.
then salesforce.com for pda came in. but its ok, during that time i could not afford to die or have an accident. i still feel not compensated enough for a system done under 10 million which our biggest competitor spent 480 million.
back then, i had an envious eye for C# having the edge in networking. when i was about to begin using vb.net for pda, the changes above happened.
i found that vb.net scripting is used in the newer sql server. and given too much new technology, i may not be able to shift in time to be good in C#.
i am forced to look on whatever advantage i have left to leverage, and that's vb.net and sql server. i still hope things will get better and i could start mastering C#, just to know.
November 13, 2009 at 4:13 am
I've come to .Net having done loads of languages over the past 30 years from assembler, fortran and cobol to pascal, delphi and now VB.Net. Yet I've always managed to avoid professional work with either classic Basic or the C family.
VB was the choice because of ease of learning and syntax and because of the need to support some old classic asp with vbscript. Mostly the choice is made by the company - whether you are a VB shop or a C shop - simply because having everyone working in one language makes it easier when software has to be maintained by others and also by the total skill set available.
November 13, 2009 at 4:33 am
I started my career with a vb6 programmer and later I used vb.net. Now I am using C#. I never felt any problem with languages. what I think, as per technical aspect both languages are same, no difference. But what I see, if I search some program or source codes related to my work on the internet (google) then I found more examples & articles in C# than VB.NET which are more easier to copy & paste those codes. Though microsoft & some others provide the code converter, but it is an extra work. Due to this reason I switched to C#.
November 13, 2009 at 4:33 am
I think that the superiority of C# is only in psychics. There are no great differnces in programming languages. All differences are in the target and all are caused by compiler.
C# has an advantage it resembles C/C++, so ther is a great community of programmers, code in C# is readable for them.
Everyone who once used LISP (eg. in AutoCAD) blesses semicolons and curly brackets.
In all the years I'm programming, I tried:
Basic (many platforms), Fortran
Pascal, Turbo Pascal, Borland Pascal, Delphi
Simula
Prolog, LISP, AutoLISP
C, C++, C#
PowerBuilder
T-SQL
and maybe something, I don't remember now.
November 13, 2009 at 4:36 am
thierry.vandurme (11/13/2009)And with .NET its all IL in the end, being C#, VB.NET, ...
No. That is like saying it is all x86 machine code so C, Pascal, LISP and anything else that compiles to it is the same features-wise. C++ was originally just a preprocessor of code for a C compiler. They do not provide the same features but have a rather large common subset.
I am quite happy to discuss this but my viewpoint is clear. Saying it is all IL in the end is a gross simplification. Otherwise I could expect to be able to use XML literals in C# which I cannot (for better or worse).
Gaz
-- Stop your grinnin' and drop your linen...they're everywhere!!!
November 13, 2009 at 4:41 am
Gary, I did'nt say EVERYTHING ends up in IL. The .NET languages end up producing IL...
November 13, 2009 at 4:51 am
thierry.vandurme (11/13/2009)
Gary, I did'nt say EVERYTHING ends up in IL. The .NET languages end up producing IL...
That is not my point. My point is that you said that as both languages target IL then there feature sets are the same. I am just highlighting that is never the case. They are different languages and can add additional features, albeit at the same or higher lever of abstraction, that do not exist in peer languages.
Eiffle is another language that is a perfect example. Originally producing C, there is a .NET version which adds pre and post conditions which are features that only now Microsoft are adding to C# and VB.NET and yet it is not a feature of IL.
Gaz
-- Stop your grinnin' and drop your linen...they're everywhere!!!
November 13, 2009 at 4:52 am
I find VB.NET better.
1. In a non-american keyboard it is easier to code faster since the curly brackets needs awkward keybard combination, AltGr + 7/0.
2. Case constructs is better:
Select Case olType
Case 43, 53 To 57
dt = oMsg.ReceivedTime
Case 46
dt = oMsg.LastModificationTime
Case Else
dt = Nothing
End Select
3. C# is harder to read (and uglier) due to parentesies and brackets:
C#
public static void HandleControl(System.Web.UI.Control oControl, System.Type oType,
ProcessControlDelegate controlMethod, DelegateArgs delegateParam, bool exactType, int depth)
{
if (((exactType == true) && (oControl.GetType() == oType)) ||
(oType.IsInstanceOfType(oControl)))
{
if (null != controlMethod)
{
controlMethod(oControl, delegateParam, depth);
}
}
depth += 1;
foreach (System.Web.UI.Control oChildControl in oControl.Controls)
{
HandleControl(oChildControl, oType, controlMethod, delegateParam, exactType, depth);
}
}
VB
Public Sub HandleControl( _
ByVal oControl As System.Web.UI.Control, _
ByVal oType As System.Type, _
ByVal controlMethod As ProcessControlDelegate, _
ByVal delegateParam As DelegateArgs, _
ByVal exactType As Boolean, _
ByVal depth As Integer)
If (exactType = True AndAlso oControl.GetType Is oType) _
OrElse (oType.IsInstanceOfType(oControl)) Then
RaiseEvent ControlMethod(oControl, delegateParam, depth)
End If
depth += 1
For Each oChildControl As System.Web.UI.Control In oControl.Controls
HandleControl(oChildControl, oType, controlMethod, delegateParam, exactType, depth)
Next
End Sub
November 13, 2009 at 4:54 am
Well, if you lay it all out flat like that it won't be very easy to read. Usually you indent the code in between the braces to make it easier to read--in fact, pretty sure that's what the Visual Studio editor does by default!
Viewing 15 posts - 16 through 30 (of 176 total)
You must be logged in to reply to this topic. Login to reply