Beating a dead Horse: Which Language

  • Thread starter Thread starter cfmortgagepro
  • Start date Start date
Wilbur Slice said:
I know what you mean. And I used to feel that way, too. But I got
assimilated. I used VB.NET for a year or so and got used to that
feature - even came to appreciate it. When I switched over to C#, I
found it annoying that I had to waste my attention fretting over
trivial nonsense like formatting.

How much attention does it take to hit '}'? That's all it takes to
reformat a block. Alternatively, Ctrl+K, Ctrl+F will format the
selection.
 
How much attention does it take to hit '}'? That's all it takes to
reformat a block. Alternatively, Ctrl+K, Ctrl+F will format the
selection.


Well, like I said. I used to feel the way you do. I made all the
same arguments you're making. But then I used VB.NET for a year or so
and I find that I like it better in this regard.

But it's just a matter of opinion, and you're certainly entitled to
yours. I'm not trying to convert you, I merely stated my personal
opinion.
 
Depends... read-on... like someone else said it is only a thin layer on top,
best techical summary found is the win script 5.6 help documentation. Note:
a summary to me is a bunch of simple try me examples, and that's what that
is, not some writer, like me's, bs.

1st ask what are your needs; let me summarize then explain. if you are
doing web then i would definately go with vb.net and if you are doing lower
level stuff such as writting hardware drivers then go with vc++. Somewhere
in the middle is c#. I wasted the last several months 16+ hrs a day trying
to get one simple answer, and really concluded it is a far larger battle to
change an os' language, which is really where your question begs to ask...

I think vb for your needs is by far the way to go, yes and no it is easier.
It has the most uses and examples i will say, but any are easy if you spend
the time. Here are some points I 1st overlooked:
1) VB is the LANGUAGE for the ms OFFICE suite, which you will find the key
to any development.
2) its the most WIDELY USED langauage as well.
3) IIS's debug and other key peices to web interaction are made for vb
* Ever language has flaws, vb has a little more history than c# and a larger
library, which will always be true for it has a larger programs base than any
other ms language.
** I don't use it currently, but wish i could at times... so go figure.
 
When i started programing i tried to learn java (about 5 years ago) but gave
up and learnt basic which then progressed into vb4 and then 2 years ago i
got vs.net 2003 and have mainly worked with vb.net up untill christmas but
then i tried to do some programming in c++ and found it impossible to take
what i had learnt in vb to c++. So to try and get into c++ i rewrote a game i
had written in vb to c# and since then i have been able ot write fluently in
c# and have found it 10x easier learning c++ and other c++ like languages
like php, j#, vc++. Personally i would recomend c# as it is simiular to many
other languages, and will help you change to other languages in the future,
although knowing vb is also a good idea, as some big projects are written in
vb.net e.g. DotNetNuke.

another big reason to learn c# is because you are not then tied to microsoft.

borland c# builder and many others also the mono (.net platform for linux
and windows) platform supports c# fully and i have heard that vb.net code
does not compile very well on mono.

also i believe that subconsicenly c# is looked as a better language as it is
more c++ which is known for being a professionals language and respected and
visual basic a basic language for newbies

Lloyd
 
How much attention does it take to hit '}'? That's all it takes to
reformat a block. Alternatively, Ctrl+K, Ctrl+F will format the
selection.

on a german keyboard this is 19 keys
including 4 modifiers and two unconvient
finger twists:

if (true)
{
|
}

In VS 2005 code snippets might ease
the pain, I'll try hard to gain from it.

In VB it's 8 keys, no modifiers, no finger twist:

If True Then
|
End If

Curly braces forces me to spend more time
typing and formatting code.

curly braces forces me to read unreadable
formatting by other people.

Curly braces are not verbose enough to improve
editor features like auto formatting and
background compiling.

Curly braces make nested code harder
to read and write, naturally all code
is more or less nested. In VB the IDE
does not only know what type of block
is not closed and shows more meaningful
errors but it also closes the block
automatically, no need for modifier keys
and finger twists.

I understand there are advantages but for the
way my brain and fingers work there are clearly
more disadvantages.

I must admit, if Basic wasn't my first and most
used language I probably would think the opposite.
People get used to doing something one way and
can never get used to doing it another way
even if their method is inferior, people can not
get rid of their habits. I wrote a good amount of
C# and C++ but I don't expect getting used to it
anytime soon.

People have problems understanding differences
of other languages in particular if they didn't
even bother to learn another language. I have tons
of issues with VB as well. I think both languages
are extremes in opposite directions, one is way to
compact and one way to verbose, I wish there would
be something between. I hope someday there will
be a language that fits better to my sense, I've
even considered doing my own language. It would
look pretty much like C# without curly braces,
no parenthesis used after "if", "foreach" etc.,
no semicolons, a couple of keywords added like
"Property" and "Function", better casting syntax
and other small things like "And" instead of &&,
no case sensitiveness. That are the things that
bother me more or less in C#. Lot's of things can
be shortened like "Use" instead of "using" or "Space"
instead of "Namespace" though that keywords aren't
used often anyway.

Regards,
stax
 
So....if you should learn the .NET Framework, and then learn the various
languages....could you please recommend some books to start with on this
journey?

Thanks
 
Hi,

I know that I'm an extreme newb by asking this overly beaten question,
but I am leaning toward C#, becuase the perception is that it is better
to learn than VB.Net. I guess it makes you cooler.:-)

Anyhow, I am a novice programmer, and I will remain one as well...I have
no plans to make programming my life ambition, but I think that it would
be fun to make my databases do some cool tricks and maybe write a
simplistic client to access the database over the LAN, and by internet
as well. My programing will be centered around Data manipulation, i.e.
collecting, sorting, and reporting on this data to myself.....

I want to know which language you find most compelling to accomplish my
mission. It may be that it doesn't have anything at all to do with the
language, from my understanding they are close to equal, but everyone I
come in contact with prefer C# over VB.net

VB.NET has a lot of design decisions specifically made for beginners
like you. Things like case-insensitivity, no semicolons or curly
braces, meaningful english words for keywords. Download SharpDevelop,
a free .NET development environment, and you can start designing your
interface and programming your application right away.

I'm recommending VB.NET even though I'm trying to help make another
..NET/Mono language called boo the easiest for beginners. It's still
not there yet.
 
I have developed in a number of different languages, both MS and non-MS, I
personally like c# and found it rather easy to pick up. I will say there are
some things that a bit easier to do in VB.net than c#, but overall they are
pretty similar. The only warning I would give for a novice is that c# forces
you to be very.... exact. Case sensitive and such, but that is where Visual
Studio is nice, it will let you know when you goof most of the time.

There are a number of resources for whatever you choose. I would first
visit www.asp.net. It has a number of tutorials and a free IDE you can
download to get started. You can play around with a few different things and
see what you like.

From there, on the c# side of the world I have been happy with the Visual C#
..NET Step By Step book (ISBN: 0-7356-1909-3), it is a rather easy read and
covers some of the basic concepts.

I also like the Sams Teach Yourself books pretty well (don't flame me,
remember this is a beginner). Not to mention there are a number of really
good blogs that cover some of the more difficult and harder to find things.
I often search MSDN and google for things I need.

Having worked with other languages I have to say the MS community is one of
the best for helping others out and understanding that people aren't experts.
Good luck I hope this helps.

Ken I.
http://www.kicweb.com/blog
 
Doug H said:
VB.NET has a lot of design decisions specifically made for beginners
like you. Things like case-insensitivity, no semicolons or curly
braces, meaningful english words for keywords. Download SharpDevelop,

So are you saying that:
-case sensitivity
-The use of a single character, the semi colon
-The use of two characters, the curly braces
-The use of shorter and abbreviated words or symbols.

This is your summary of what makes C# an non beginngers language?
 
a.. C# code is also harder to "read". "Dim X as New SqlConnection()" is easier to read than "SqlConnection x = new SqlConnection();"
b.. C# is anal. VB is forgiving.
c.. Event declarations have to be made explicitly in C#. In VB we simply code "Dim x WithEvents as Y" and the Event prototypes are exposed and built for us on demand.
d.. VB.NET can automatically deal with type coercion. C# cannot. Sure, this "feature" can hide potential problems, but for beginners it makes learning the BASICs easier.
e.. In C# the "}" character ends all code blocks. In VB code blocks are delineated with End If, Next, Loop, End Sub, End Function etc. This makes code easier to read and debug as you can easily find the end of the code block.
f.. Depending on the version, Visual Studio is far easier to work with when working with VB. As you work through your code, you can easily change variable names and not have to forcibly rebuild the code to verify that the names resolve as you must in C#. C# has improved in the 2005 version in this regard.
g.. C# has caught up with VB.NET in that it will also offer edit and continue in the 2005 version. This is a tremendous productivity enhancement that radically changes the approach you must take as you develop applications.
Both C# and VB.NET produce virtually identical IL. The question you should ask when choosing a language (or a developer that uses one or the other) is "How much productivity do you want?". VB.NET developers have been shown to be more productive than C# types. The language and VS does more for them behind the scenes. Of course it can be said if you're a Java developer, transitioning to VB would be harder that C# but transitioning to J# might be even easier. If you're a C++ developer, you need to look at Managed C++--not C#.

Just my $.02.



--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
William \(Bill\) Vaughn said:
a.. C# code is also harder to "read". "Dim X as New SqlConnection()"

I dont doubt it in the manner you posted. But teh manner that the first person posted either was not
posted well, or the poster seems to think that {} ; and case senstivity are the hallmarks of a
professional language and the deciding factor. I was trying to determine if thats what he meant, or it
was simply a miscommunication in his post.
 
William (Bill) Vaughn said:
a.. C# code is also harder to "read". "Dim X as New SqlConnection()"
is easier to read than "SqlConnection x = new SqlConnection();"

You may find the C# harder to read, but personally I find it easier. It
keeps the declaration separate from the
b.. C# is anal. VB is forgiving.

I like compilers to be picky. It means I can find more potential
problems at compile time rather than hoping I'll hit all of them in
testing.
c.. Event declarations have to be made explicitly in C#. In VB we
simply code "Dim x WithEvents as Y" and the Event prototypes are
exposed and built for us on demand.

And if you use that without knowing what's *really* going on (as I
suspect many developers do) you can get bitten by it - I answered a
question on that a month or so ago.
d.. VB.NET can automatically deal with type coercion. C# cannot.
Sure, this "feature" can hide potential problems, but for beginners
it makes learning the BASICs easier.

Again, I like to see problems early.
e.. In C# the "}" character ends all code blocks. In VB code blocks
are delineated with End If, Next, Loop, End Sub, End Function etc.
This makes code easier to read and debug as you can easily find the
end of the code block.

Double click on the brace and you'll find the matching one. If your
methods are short for readability purposes anyway, it shouldn't be a
problem IME.
f.. Depending on the version, Visual Studio is far easier to work
with when working with VB. As you work through your code, you can
easily change variable names and not have to forcibly rebuild the
code to verify that the names resolve as you must in C#. C# has
improved in the 2005 version in this regard.

It's still miles away from Eclipse's refactoring support,
unfortunately. said:
g.. C# has caught up with VB.NET in that it will also offer edit and
continue in the 2005 version. This is a tremendous productivity
enhancement that radically changes the approach you must take as you
develop applications.

Fortunately it won't change how *everyone* develops applications. I'm
firmly of the view that as little time as possible should be spent in a
debugger. As far as I'm concerned, if I have to go into the debugger
that means I've already failed to some extent - my unit tests either
haven't tested a sufficiently small block of code, or my code isn't
readable enough to make the error obvious just by inspection.
Both C# and VB.NET produce virtually identical IL. The question you
should ask when choosing a language (or a developer that uses one or
the other) is "How much productivity do you want?". VB.NET developers
have been shown to be more productive than C# types.

Do you have a reference to a study that shows that with a decent
methodology? I suspect there's hearsay about it both ways, and probably
biased studies both ways too.

Don't forget that there's a lot more to being productive than getting
functionality written quickly - to my mind it's more about getting
*high quality* code written quickly. That's where language constructs
such as the "using" statement in C# help, by making it easy to do the
right thing with streams etc.

It prevents subtle bugs like calling Sleep "on" a specific thread and
expecting it to make that thread sleep rather than the current thread -
C# would disallow that as Thread.Sleep is a static method.
The language and VS does more for them behind the scenes. Of course
it can be said if you're a Java developer, transitioning to VB would
be harder that C# but transitioning to J# might be even easier. If
you're aC++ developer, you need to look at Managed C++--not C#.

C# is a significantly cleaner language than Managed C++, IMO. Unlessyou
need the ease of calling unmanaged code directly, I'd strongly urge
"native" C++ developers who are moving to .NET to at least give C# a
good try.
 
Jon Skeet said:
You may find the C# harder to read, but personally I find it easier. It
keeps the declaration separate from the

Oops - concentration slipped.

It keeps the declaration separate from the assignment, and they
logically are two different concepts. The VB also introduces two extra
keywords for no particular purpose, as far as I can see. From the C#,
it's obvious that it's a declaration because it starts with a type
name. Why include extra text which carries no information?
 
Jon,

Jon Skeet said:
You may find the C# harder to read, but personally I find it easier. It
keeps the declaration separate from the


In VB.NET you can write 'Dim x As SqlConnection = New SqlConnection()' too.
'Dim x As Y' is more self-describing than "Y x;" and thus less confusing,
especially for beginners.
I like compilers to be picky. It means I can find more potential
problems at compile time rather than hoping I'll hit all of them in
testing.

C# doesn't have advantages with 'Option Strict' and 'Option Explicit' turned
on. In fact VB.NET is even more strict than C# with these settings applied.
Consider the following piece of code:

\\\
bool a = ..., b = ...;
if (a = b)
...;
///

A beginner wants to compare the values of 'a' and 'b' and forgets to type
'==' as comparison operator. The code will compile and it's very hard to
find the logical bug. This gets even worse when dealing with more complex
expressions. In VB.NET, potential problems like this do not occur as often.
Again, I like to see problems early.

The great thing is that you can turn the feature off and work with strict
semantics, without loosing the benefits of a BASIC-type programming
language.
Double click on the brace and you'll find the matching one. If your
methods are short for readability purposes anyway, it shouldn't be a
problem IME.

I don't think that it's a big problem either, but in VB.NET you don't even
need to doubleclick anywhere or watch at tooltips, depending on the IDE you
are using.
C# is a significantly cleaner language than Managed C++, IMO. Unlessyou
need the ease of calling unmanaged code directly, I'd strongly urge
"native" C++ developers who are moving to .NET to at least give C# a
good try.

I don't see much need for C#. On the one hand, C++/CLI will strongly
improve developing managed/mixed solutions using C++, on the other hand the
VB.NET programming language is IMO more suitable for general .NET
development (libraries, database development, web development) than C#
because it encourages developers to write CLS-compliant code.
 
Herfried K. Wagner said:
In VB.NET you can write 'Dim x As SqlConnection = New SqlConnection()' too.
'Dim x As Y' is more self-describing than "Y x;" and thus less confusing,
especially for beginners.

How long do you really think it takes to get used to the syntax that
doesn't include redundant text? Have a look at the casting syntax in C#
compared with VB.NET - do you really think that the CType syntax is
more elegant than the casting syntax? (Admittedly I wish that the
unboxing and conversion syntax in C# were distinct from casting, but
that's another issue. There are various things I'd like to see done
differently in C#...)

I'll certainly accept that C# has a bit of a steeper learning curve
than VB.NET, but I don't think that's the be all and end all.

In terms of a language itself, of course, it's significantly smaller
than VB.NET - what there is may be slightly harder to learn, but there
are far fewer keywords - 78 in C# compared with 151 in VB.NET. That's
from the VS 2005 beta 2 docs, not including unreserved keywords in VB
or those beginning with #. That's also not including all the VB built
in functions, many of which have been carried over from previous
versions of VB despite perfectly reasonable versions of many (most? I
don't have enough experience in VB to know) being available in the
framework.

In short, being a new language, C# doesn't have nearly as much baggage
as VB.NET does. (There are one or two places where C syntax has
unnecessarily been carried over, and that's a shame, but it's far from
the same situation as in VB.NET.)
C# doesn't have advantages with 'Option Strict' and 'Option Explicit' turned
on. In fact VB.NET is even more strict than C# with these settings applied.

In a very few cases - but not in many others.
Consider the following piece of code:

\\\
bool a = ..., b = ...;
if (a = b)
...;
///

A beginner wants to compare the values of 'a' and 'b' and forgets to type
'==' as comparison operator. The code will compile and it's very hard to
find the logical bug. This gets even worse when dealing with more complex
expressions.

Only where you're comparing two boolean values directly, which I find
to be pretty rare. I'll certainly accept that there's potential for a
bug there though. How often have you actually seen that bug, out of
interest?
In VB.NET, potential problems like this do not occur as often.

Consider the following then, where "thread" is a variable of type
Thread:

thread.Sleep(5000);

If you were a beginner, what would you think that would do? In C# it's
not valid because Thread.Sleep is a static method. In VB.NET (2003) it
compiles without a warning, even in Option Strict mode. In 2005 it's an
optional warning/error, fortuantely.

Another example - C# doesn't let you use a local variable unless it's
been definitely initialised. VB.NET (2003) does - again, a new
warning/error in 2005.

Another example - VB.NET lets you pass properties by reference, even
though the semantics are significantly different in terms of timing and
what happens if an exception is thrown. I wonder what proportion of
VB.NET developers really know what happens when a property is passed by
reference?
The great thing is that you can turn the feature off and work with strict
semantics, without loosing the benefits of a BASIC-type programming
language.

Even "strict" isn't strict enough for me though - see above.

As for the benefits of a BASIC-type language - they remain to be shown
to my satisfaction.
I don't think that it's a big problem either, but in VB.NET you don't even
need to doubleclick anywhere or watch at tooltips, depending on the IDE you
are using.

And as I say, you don't need to in C# if you write readable code to
start with.
I don't see much need for C#. On the one hand, C++/CLI will strongly
improve developing managed/mixed solutions using C++, on the other hand the
VB.NET programming language is IMO more suitable for general .NET
development (libraries, database development, web development) than C#
because it encourages developers to write CLS-compliant code.

You can force C# to be CLS-compliant too very easily - just add the
CLSCompliantAttribute to the assembly.

You might want to consider this similar to the fact that VB.NET doesn't
even have Option Strict on by default - which is *far* more dangerous
than non-CLS-compliance, in my view.

C# is *much, much* easier to develop in than C++, even managed C++, and
I still find it a significantly better language than VB.NET for pure
..NET development.

Are you able to show that VB.NET developers are more productive than C#
developers, by the way?
 
If you have no intention of making programming your life's ambition, go with
VB. Database development is fast, clean, and powerful in VB without the
learning curve of C (# or otherwise). VB.NET has some awesome database tools
built-in. Regardless of what anyone says, VB is as powerful (if not more so)
as C in database application development. Dont take my word for it, ask
Microsoft.

C gets its power from its intrinsic design and vast library collection. VB
is not portable (like to Linux or Mac), C is. C is almost holy to the memory,
interrupt, and environment control freaks, VB could care less (unless it has
something to do with the functionality of the application you are building).
Ten years ago I would have said "at least KNOW C". For Windows development
here and now, its six of one, half a dozen of the other.

As far as the cool factor goes, cool is subjective. I think its cool when my
app does what I want without bugs or a BSOD (blue screen of death),
regardless of how I built it. The end user wont see your code, he will see
the crash.
 
SpikeTool said:
If you have no intention of making programming your life's ambition, go with
VB. Database development is fast, clean, and powerful in VB without the
learning curve of C (# or otherwise). VB.NET has some awesome database tools
built-in. Regardless of what anyone says, VB is as powerful (if not more so)
as C in database application development. Dont take my word for it, ask
Microsoft.

C gets its power from its intrinsic design and vast library collection. VB
is not portable (like to Linux or Mac), C is. C is almost holy to the memory,
interrupt, and environment control freaks, VB could care less (unless it has
something to do with the functionality of the application you are building).
Ten years ago I would have said "at least KNOW C". For Windows development
here and now, its six of one, half a dozen of the other.

As far as the cool factor goes, cool is subjective. I think its cool when my
app does what I want without bugs or a BSOD (blue screen of death),
regardless of how I built it. The end user wont see your code, he will see
the crash.

You seem to be regarding C# as equivalent to C. While the syntax is
similar in many ways, they're very different languages. For one thing,
all the power of the .NET framework which VB.NET uses for database
access is also available in C#.

I wouldn't want to do database development in C, but the OP didn't
*ask* about C - he asked about C#.
 
That's funny. There are more "professional" developers today coding in VB
and its derivatives than all other languages combined.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Chad said:
This is your summary of what makes C# an non beginngers language?

You missed the part in my note where I referred to VB.NET. According
to your logic, since I didn't mention the Empire State building either,
I must have been making arguments about why the Empire State building
is not a beginners' language either.
 
Back
Top